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

List of dictionaries broken in recadm.add #7

Closed
dgets opened this issue Sep 18, 2018 · 1 comment
Closed

List of dictionaries broken in recadm.add #7

dgets opened this issue Sep 18, 2018 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@dgets
Copy link
Owner

dgets commented Sep 18, 2018

In recadm.add's view (views.py), I am chopping up some data to reduce network traffic before sending it to the template rendering. In the index view, the piecemeal data is put together into mydata without any issues, utilizing a list of dictionaries. When I try to do the same thing, with the exact same methodology, below, in the add view, I'm getting the following error:

File "/home/sprite/src/py/django/lasttime/recadm/views.py", line 36, in add
mydata.add({'name': sub.common_name, 'id': sub.id, })
AttributeError: 'list' object has no attribute 'add'

So yeah, I've not slept in too long, so I'm just going to halt here before I start making things really ugly. No doubt I'm missing something horribly obvious.

@dgets dgets added bug Something isn't working enhancement New feature or request labels Sep 18, 2018
@dgets dgets added this to the alpha milestone Sep 18, 2018
@dgets dgets self-assigned this Sep 18, 2018
dgets added a commit that referenced this issue Sep 18, 2018
…. Stuck at #7, probably just due to lack of sleep.
@dgets
Copy link
Owner Author

dgets commented Sep 20, 2018

So yeah, switching to .append() worked wonders for this. Derp.

@dgets dgets closed this as completed in e48ed29 Nov 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant