You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2018. It is now read-only.
querysets.WorkflowTypeQuerySet.filter() should behave like a class method #4
How would the method prototype would look like then, would domain_name become mandatory?
Plus, I'm very aware of class methods usage, but queryset depends on their instance connection attribute to go fetch data from amazon, how would it be handled without self instance reference?
current method:
deffilter(self, domain_name=None, registration_status=REGISTERED, name=None):
"""Filters workflows based of their status, and/or name"""defget_workflows():
response= {'nextPageToken': None}
while'nextPageToken'inresponse:
response=self.connection.list_workflow_types(
domain_name,
registration_status,
name=name,
next_page_token=response['nextPageToken']
)
forworkflowinresponse['typeInfos']:
yieldworkflow# As WorkflowTypeQuery has to be built against a specific domain# name, domain filter is disposable, but not mandatory.domain_name=domain_nameorself.domain.namereturn [self.to_WorkflowType(wf) forwfinget_workflows()]
Activity
oleiade commentedon Apr 4, 2013
How would the method prototype would look like then, would domain_name become mandatory?
Plus, I'm very aware of class methods usage, but queryset depends on their instance connection attribute to go fetch data from amazon, how would it be handled without
selfinstance reference?current method:
ggreg commentedon Apr 4, 2013
If
domain_nameis a filtering key we should allow to instanciate a queryset without a domain.