Fix bug when editing vendor

This commit is contained in:
Lance Edgar 2023-10-24 17:44:02 -05:00
parent 1f3877b7cb
commit f708cb0b25

View file

@ -78,7 +78,7 @@ class VendorView(MasterView):
]
def configure_grid(self, g):
super(VendorView, self).configure_grid(g)
super().configure_grid(g)
g.filters['name'].default_active = True
g.filters['name'].default_verb = 'contains'
@ -124,8 +124,9 @@ class VendorView(MasterView):
def objectify(self, form, data=None):
if data is None:
data = form.validated
vendor = super(VendorView, self).objectify(form, data)
vendor = super().objectify(form, data)
vendor = self.objectify_contact(vendor, data)
app = self.get_rattail_app()
if 'orders_email' in data:
address = data['orders_email']
@ -169,7 +170,7 @@ class VendorView(MasterView):
self.Session.delete(cost)
def get_version_child_classes(self):
return super(VendorView, self).get_version_child_classes() + [
return super().get_version_child_classes() + [
(model.VendorPhoneNumber, 'parent_uuid'),
(model.VendorEmailAddress, 'parent_uuid'),
(model.VendorContact, 'vendor_uuid'),
@ -186,14 +187,14 @@ class VendorView(MasterView):
]
def configure_get_context(self, **kwargs):
context = super(VendorView, self).configure_get_context(**kwargs)
context = super().configure_get_context(**kwargs)
context['supported_vendor_settings'] = self.configure_get_supported_vendor_settings()
return context
def configure_gather_settings(self, data, **kwargs):
settings = super(VendorView, self).configure_gather_settings(
settings = super().configure_gather_settings(
data, **kwargs)
supported_vendor_settings = self.configure_get_supported_vendor_settings()
@ -205,7 +206,7 @@ class VendorView(MasterView):
return settings
def configure_remove_settings(self, **kwargs):
super(VendorView, self).configure_remove_settings(**kwargs)
super().configure_remove_settings(**kwargs)
app = self.get_rattail_app()
names = []