Closed greatislander closed 4 years ago
I got this error when trying to save the new Individual profile. Reloaded everything, logged out, logged in. I see the profile I was trying to create so the error occurred after the .save()
but clicking on that generates the same error.
Also, I do not see Edit links; are they supposed to be on My Profiles near the Delete or on the actual profile page?
My branch is at 6d64e5b.
Traceback (most recent call last):
File "/Users/erictheise/Repos/platform-coop-toolkit/coop-map-directory-index/.cmdi/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/Users/erictheise/Repos/platform-coop-toolkit/coop-map-directory-index/.cmdi/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/erictheise/Repos/platform-coop-toolkit/coop-map-directory-index/.cmdi/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/erictheise/Repos/platform-coop-toolkit/coop-map-directory-index/maps/views.py", line 438, in individual_detail
worked_with_relationship = Relationship.objects.get(name="Worked with")
File "/Users/erictheise/Repos/platform-coop-toolkit/coop-map-directory-index/.cmdi/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/erictheise/Repos/platform-coop-toolkit/coop-map-directory-index/.cmdi/lib/python3.7/site-packages/django/db/models/query.py", line 417, in get
self.model._meta.object_name
Exception Type: DoesNotExist at /individuals/1
Exception Value: Relationship matching query does not exist.
@erictheise Ah, that error is because there is a new relationship ("Worked with") which I'd added locally but not to the demo site: https://demo.directory.platform.coop/admin/mdi/relationship/4/
The links are on the actual profile pages. Because there are two different editing modes ("Edit Basic Information") and ("Edit Overview") we moved them to the profile page itself.
EDIT: Now working as expected.
@waharnum The issue I was mentioning is as follows:
I found this article about class-based views with inline formsets but I'm not quite connecting the dots: http://kevindias.com/writing/django-class-based-views-multiple-inline-formsets/
Thanks in advance for any insight you might have here.
EDIT: Now working as expected.
Making some progress on editable social media in https://github.com/platform-coop-toolkit/coop-map-directory-index/pull/126/commits/844ab69bf1213d5d16eccaeb96d990710ccc73fd but I'm not sure this is the right direction.
Description
Allows one's individual profile to be edited after it's created.
Steps to test
Expected behavior: Editing all data works as expected.
Additional information
Not applicable.
Related issues
Not applicable.