summaryrefslogtreecommitdiff
path: root/app/views/consts.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/consts.py')
-rw-r--r--app/views/consts.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/consts.py b/app/views/consts.py
index 0cc7199..66c8938 100644
--- a/app/views/consts.py
+++ b/app/views/consts.py
@@ -44,11 +44,13 @@ class ConstForm(F.Form):
description = F.StringField('Beschreibung', F.req)
category = F.QuerySelectField('Kategorie',
- get_label='name')
+ get_label='name',
+ get_pk=lambda c: c.id)
prev = F.QuerySelectField('Vorgänger',
get_label='description',
- allow_blank=True)
+ allow_blank=True,
+ get_pk=lambda p: p.id)
def __init__(self, cur=None, obj=None):
obj = cur if obj is None else obj