Skip to content
Snippets Groups Projects
Commit 74437b80 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Fix hash computation in admin view

The hash is supposed to be computed in the __init__ method of Item.
But flask-admin never passes any parameter when creating the model class.
The attributes are changed after creation.

When creating an item in the admin view, we use the on_model_change
method to update the hash.

There might be a better way to avoid this code duplication.
This works for now.
parent aeaab0a7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment