Skip to content
Snippets Groups Projects
Forked from ICS Control System Infrastructure / csentry
Source project has a limited visibility.
  • Benjamin Bertrand's avatar
    74437b80
    Fix hash computation in admin view · 74437b80
    Benjamin Bertrand authored
    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.
    74437b80
    History
    Fix hash computation in admin view
    Benjamin Bertrand authored
    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.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.