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

[REVIEW] 466 - Fix created object owner definition #484

Conversation

durvalcarvalho
Copy link
Collaborator

Description

I found the bug that was generating the TypeError described in issue #466.
Apparently someone was confusing the owner and author fields and was using the profile object for the form, since the form only supports the author textual field.

The solution, according to the Django documentation, is to first create the object and then associate the created object with the logged in user.

Resolves (Issues)

#466 - Create a object results in a TypeError

General tasks performed

  • Minor change to how forms are saved in the upload_elements function

Have you confirmed the application builds locally without error? See here.

  • Yes

Copy link
Member

@pablodiegoss pablodiegoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loved the changes on those save calls, improved some database calls as an extra for this error on author and owner.

Thank you very much for the contributions! :D

@pablodiegoss pablodiegoss merged commit d2cf9c3 into memeLab:develop Oct 27, 2022
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.

2 participants