Skip to content

Commit

Permalink
Rename to often used 'queryset'
Browse files Browse the repository at this point in the history
  • Loading branch information
tino committed Aug 3, 2018
1 parent d20bf19 commit f1e4d0a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fixture_magic/management/commands/custom_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ def handle(self, *args, **options):
dump_settings = settings.CUSTOM_DUMPS[dump_name]
app_label, model_name, *manager_method = dump_settings['primary'].split('.')
include_primary = dump_settings.get("include_primary", False)

default_manager = loading.get_model(app_label, model_name).objects
if manager_method:
dump_me = getattr(default_manager, manager_method[0])()
queryset = getattr(default_manager, manager_method[0])()
else:
dump_me = default_manager
queryset = default_manager.all()
if pks:
objs = dump_me.filter(pk__in=pks)
else:
objs = dump_me
queryset = queryset.filter(pk__in=pks)

deps = dump_settings.get('dependents', [])
for obj in objs.all():
for obj in queryset:
# get the dependent objects and add to serialize list
for dep in deps:
process_dep(obj, dep, serialize_me, seen)
Expand Down

0 comments on commit f1e4d0a

Please sign in to comment.