mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-05 18:34:52 +00:00
Make sure the submitter is always listed as an organisation admin
This fixes organisation submitting again, and also makes it impossible to orphan oneself from an organisation.
This commit is contained in:
@ -26,6 +26,11 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
|
||||
r.submitter = request.user
|
||||
r.save()
|
||||
|
||||
# If we have a callback with the current user
|
||||
if hasattr(form, 'apply_submitter'):
|
||||
form.apply_submitter(r, request.user)
|
||||
r.save()
|
||||
|
||||
# In case fixedfields include a manytomany field, we need to make sure the main form is saved first,
|
||||
# so we can access the field without an exception.
|
||||
if fixedfields:
|
||||
|
Reference in New Issue
Block a user