Skip to content

Commit

Permalink
fix(Member Data Import): Address can always be updated
Browse files Browse the repository at this point in the history
Here we only update specific fields of an Address. This should be possible, even if the user does not have the permissions to update the Address record otherwise (e.g because it is linked to a Customer).
  • Loading branch information
barredterra committed Jan 16, 2025
1 parent 41706a1 commit 8ddd3f7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ def update_doc(self, doc: Document, fields: "list[str]"):
has_changed = True

if has_changed:
doc.save()
# Here we only update specific fields of an Address. This should be
# possible, even if the user does not have the permissions to update
# the Address record otherwise (e.g because it is linked to a Customer).
ignore_permissions = doc.doctype == "Address"
doc.save(ignore_permissions=ignore_permissions)


def create_member(organization: str, last_name: str) -> LANDAMember:
Expand Down

0 comments on commit 8ddd3f7

Please sign in to comment.