mirror of
https://github.com/postgres/pgweb.git
synced 2025-07-29 11:59:36 +00:00
Make filter_by_user apply to forms when they are edited as well, not just
when they are created. This is to make sure the organisation list, for example, doesn't list all non-avaiable organisations when there was a missing field somewhere else in the form.
This commit is contained in:
@ -32,8 +32,9 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
|
||||
else:
|
||||
# Generate form
|
||||
form = formclass(instance=instance)
|
||||
if hasattr(form, 'filter_by_user'):
|
||||
form.filter_by_user(request.user)
|
||||
|
||||
if hasattr(form, 'filter_by_user'):
|
||||
form.filter_by_user(request.user)
|
||||
|
||||
if hasattr(instancetype, 'markdown_fields'):
|
||||
markdownfields = instancetype.markdown_fields
|
||||
|
Reference in New Issue
Block a user