django-orphaned
django-orphaned copied to clipboard
TypeError: 'flat' is not valid when values_list is called with more than one field.
$ python manage.py deleteorphaned --info
Traceback (most recent call last):
File "manage.py", line 8, in <module>
execute_from_command_line(sys.argv)
File "/home/foo/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/foo/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/foo/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/foo/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/home/foo/local/lib/python2.7/site-packages/django_orphaned/management/commands/deleteorphaned.py", line 38, in handle
files = mc.objects.all().values_list(*fields,flat=True)
File "/home/foo/local/lib/python2.7/site-packages/django/db/models/query.py", line 533, in values_list
raise TypeError("'flat' is not valid when values_list is called with more than one field.")
TypeError: 'flat' is not valid when values_list is called with more than one field.
+1
+1
installing the latest version (eg django-orphaned-updated) could possibly fix this.