Changeset 1908092 in tailbone


Ignore:
Timestamp:
02/19/19 20:14:10 (5 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
145e7f5
Parents:
6a57e51
Message:

Declare "is contact" for the Customers view

removes some duplicated code. also this adds CustomerNote? to version history

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tailbone/views/customers.py

    r6a57e51 r1908092  
    5050    """
    5151    model_class = model.Customer
     52    is_contact = True
    5253    has_versions = True
    5354    supports_mobile = True
     
    253254            raise colander.Invalid(node, "Customer ID must be unique")
    254255
    255     def objectify(self, form, data=None):
    256         if data is None:
    257             data = form.validated
    258         customer = super(CustomersView, self).objectify(form, data)
    259         customer = self.objectify_contact(customer, data)
    260         return customer
    261 
    262256    def render_default_email(self, customer, field):
    263257        if customer.emails:
     
    347341            (model.CustomerMailingAddress, 'parent_uuid'),
    348342            (model.CustomerPerson, 'customer_uuid'),
     343            (model.CustomerNote, 'parent_uuid'),
    349344        ]
    350345
Note: See TracChangeset for help on using the changeset viewer.