From 2e92f561d8443303674fe822d8584483f6bd2bc5 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 29 Oct 2019 19:58:08 -0500 Subject: [PATCH] Assume "local only" flag should be ON by default, for new objects i.e. if that is a thing, for the given master view --- tailbone/views/master.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tailbone/views/master.py b/tailbone/views/master.py index c4abff36..c86ed252 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -1402,6 +1402,10 @@ class MasterView(View): if self.secure_global_objects: if not self.has_perm('view_global'): form.remove_field('local_only') + elif self.creating: + # assume this flag should be ON by default - it is hoped this + # is the safer option and would help prevent unwanted mistakes + form.set_default('local_only', True) def configure_mobile_form(self, form): """