Changeset 1b69309 in rattail
- Timestamp:
- 07/24/2022 01:21:01 PM (6 months ago)
- Branches:
- master
- Children:
- e77ce7f
- Parents:
- 780f781
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rattail/db/model/contact.py
r780f781 r1b69309 3 3 # 4 4 # Rattail -- Retail Software Framework 5 # Copyright © 2010-202 1Lance Edgar5 # Copyright © 2010-2022 Lance Edgar 6 6 # 7 7 # This file is part of Rattail. … … 196 196 """ 197 197 flush = kwargs.pop('flush', True) 198 primary = kwargs.pop('primary', False) 198 199 email = self.make_email(**kwargs) 199 200 self.emails.append(email) … … 201 202 session = orm.object_session(self) 202 203 session.flush() 204 if primary: 205 self.set_primary_email(email, flush=flush) 203 206 return email 204 207 … … 263 266 """ 264 267 flush = kwargs.pop('flush', True) 268 primary = kwargs.pop('primary', False) 265 269 phone = self.make_phone(**kwargs) 266 270 self.phones.append(phone) … … 268 272 session = orm.object_session(self) 269 273 session.flush() 274 if primary: 275 self.set_primary_phone(phone, flush=flush) 270 276 return phone 271 277
Note: See TracChangeset
for help on using the changeset viewer.