def save(self, updateBy=None, *args, **kwargs):
if (<EOL>self.staffMember and self.staffMember.userAccount and not self.user<EOL>) or (<EOL>isinstance(updateBy,StaffMember) and self.staffMember.userAccount<EOL>):<EOL><INDENT>self.user = self.staffMember.userAccount<EOL><DEDENT>elif (<EOL>self.user and getattr(self.user,'<STR_LIT>',None) and not self.staffMember<EOL>) or (<EOL>isinstance(updateBy,User) and getattr(self.user,'<STR_LIT>',None)<EOL>):<EOL><INDENT>self.staffMember = self.user.staffmember<EOL><DEDENT>if not self.name:<EOL><INDENT>if self.user and self.user.get_full_name():<EOL><INDENT>self.name = self.user.get_full_name()<EOL><DEDENT>elif self.staffMember:<EOL><INDENT>self.name = self.staffMember.fullName or self.staffMember.privateEmail<EOL><DEDENT>elif self.location:<EOL><INDENT>self.name = self.location.name<EOL><DEDENT><DEDENT>super(TransactionParty, self).save(*args, **kwargs)<EOL>
Verify that the user and staffMember are populated with linked information, and
ensure that the name is properly specified.