django-orphaned icon indicating copy to clipboard operation
django-orphaned copied to clipboard

TypeError: 'flat' is not valid when values_list is called with more than one field.

Open palewire opened this issue 10 years ago • 4 comments

$ 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.

palewire avatar Mar 25 '14 17:03 palewire

+1

fabiocaccamo avatar Oct 28 '15 15:10 fabiocaccamo

+1

Laski avatar Oct 30 '15 01:10 Laski

installing the latest version (eg django-orphaned-updated) could possibly fix this.

msmart avatar Nov 03 '15 14:11 msmart