diff --git a/rattail/pyramid/views/labels.py b/rattail/pyramid/views/labels.py index 92d7eb2f..931cb14e 100644 --- a/rattail/pyramid/views/labels.py +++ b/rattail/pyramid/views/labels.py @@ -114,6 +114,16 @@ class ProfileCrud(CrudView): ]) return fs + def post_save(self, form): + profile = form.fieldset.model + if not profile.format: + formatter = profile.get_formatter() + if formatter: + try: + profile.format = formatter.default_format + except NotImplementedError: + pass + def post_save_url(self, form): return self.request.route_url('label_profile.read', uuid=form.fieldset.model.uuid)