From 78821c03acb28b7398a7e6f22f0a748cbd99189a Mon Sep 17 00:00:00 2001 From: Leigh Johnson Date: Tue, 21 Feb 2023 12:18:35 -0800 Subject: [PATCH] hotfix: update django ghost member model --- django_ghost/services.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/django_ghost/services.py b/django_ghost/services.py index ab7e7b0..9795106 100644 --- a/django_ghost/services.py +++ b/django_ghost/services.py @@ -182,17 +182,17 @@ def update_or_create_ghost_member(email: str) -> GhostMember: # update existing django model if ghost_member_data is not None: logger.info("Created ghost member: %s", ghost_member_data) - ghost_member.email = ghost_member_data["email"] - ghost_member.note = ghost_member_data["note"] - ghost_member.geolocation = ghost_member_data["geolocation"] - ghost_member.last_seen_at = ghost_member_data["last_seen_at"] - ghost_member.created_at = ghost_member_data["created_at"] - ghost_member.updated_at = ghost_member_data["updated_at"] - ghost_member.labels = ghost_member_data["labels"] - ghost_member.subscriptions = ghost_member_data["subscriptions"] - ghost_member.tiers = ghost_member_data["tiers"] - ghost_member.newsletters = ghost_member_data["newsletters"] - ghost_member.save() + django_ghost_member.email = ghost_member_data["email"] + django_ghost_member.note = ghost_member_data["note"] + django_ghost_member.geolocation = ghost_member_data["geolocation"] + django_ghost_member.last_seen_at = ghost_member_data["last_seen_at"] + django_ghost_member.created_at = ghost_member_data["created_at"] + django_ghost_member.updated_at = ghost_member_data["updated_at"] + django_ghost_member.labels = ghost_member_data["labels"] + django_ghost_member.subscriptions = ghost_member_data["subscriptions"] + django_ghost_member.tiers = ghost_member_data["tiers"] + django_ghost_member.newsletters = ghost_member_data["newsletters"] + django_ghost_member.save() logger.info("Updated %s for %s", ghost_member, email) else: logger.error(