Tweak ORM relationship backrefs per SA 2.0 warnings

This commit is contained in:
Lance Edgar 2023-02-21 18:15:27 -06:00
parent 87477d7cbe
commit c03119acb2
2 changed files with 19 additions and 3 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2021 Lance Edgar
# Copyright © 2010-2023 Lance Edgar
#
# This file is part of Rattail.
#
@ -130,10 +130,20 @@ class MailChimpListMemberImporter(FromMailChimp, mailchimp_importing.model.MailC
def get_all_members(self, list_id):
members = []
# cf. https://mailchimp.com/developer/marketing/api/list-members/list-members-info/
result = self.mailchimp.lists.members.all(list_id, get_all=True,
# TODO: maybe should try this instead of
# the default which seems to be 500
# count=1000
# TODO: this testing chunk left here for
# reference; it can be handy to filter
# results etc. for test runs
# count=500,
# # since_last_changed=datetime.date(2023, 1, 1),
# sort_field='last_changed',
# sort_dir='DESC',
)
members.extend(result['members'])
return members