Change item default owner to self
This commit is contained in:
parent
bd89df82be
commit
6bf80cf820
@ -81,8 +81,9 @@ def setup_user_select(select_field, name_fields):
|
||||
name_field.data = value
|
||||
|
||||
def setup_default_owner(select_field):
|
||||
user = read_user()
|
||||
c = select_field.choices
|
||||
d = [i for i in c if i[1] == "K-SPACE MTÜ"]
|
||||
d = [i for i in c if i[0] == (user and user.get("username") or "k-space")]
|
||||
if len(d) < 1:
|
||||
return
|
||||
dv = d[0] or None
|
||||
|
Loading…
Reference in New Issue
Block a user