Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dumpscript): handle formatting of tuples #1746

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Jul 15, 2022

With tuples it would fail to format it:

  File "…/django_extensions/management/commands/dumpscript.py", line 360, in get_waiting_list
    value = get_attribute_value(self.instance, field, self.context, force=force, skip_autofield=skip_autofield)
  File "…/django_extensions/management/commands/dumpscript.py", line 697, in get_attribute_value
    item_locator = orm_item_locator(value)
  File "…/django_extensions/management/commands/dumpscript.py", line 77, in orm_item_locator
    clean_dict[key] = str("%s" % v)
TypeError: not all arguments converted during string formatting

With tuples it would fail to format it:

```
  File "…/django_extensions/management/commands/dumpscript.py", line 360, in get_waiting_list
    value = get_attribute_value(self.instance, field, self.context, force=force, skip_autofield=skip_autofield)
  File "…/django_extensions/management/commands/dumpscript.py", line 697, in get_attribute_value
    item_locator = orm_item_locator(value)
  File "…/django_extensions/management/commands/dumpscript.py", line 77, in orm_item_locator
    clean_dict[key] = str("%s" % v)
TypeError: not all arguments converted during string formatting
```
@blueyed
Copy link
Contributor Author

blueyed commented Jul 15, 2022

With regard to #1493 it should maybe use repr instead?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants