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.
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