diff --git a/app/assets/javascripts/app/lib/app_post/auth.coffee b/app/assets/javascripts/app/lib/app_post/auth.coffee index 7f95f2375..c15c6b2e7 100644 --- a/app/assets/javascripts/app/lib/app_post/auth.coffee +++ b/app/assets/javascripts/app/lib/app_post/auth.coffee @@ -150,10 +150,6 @@ class App.Auth # clear all in-memory data of all App.Model's for model_key, model_object of App - if _.isFunction(model_object.resetCallbacks) - model_object.resetCallbacks() - if _.isFunction(model_object.resetAttributes) - model_object.resetAttributes() if _.isFunction(model_object.clearInMemory) model_object.clearInMemory() diff --git a/app/assets/javascripts/app/models/_application_model.coffee b/app/assets/javascripts/app/models/_application_model.coffee index ba5b442d3..ce05630e6 100644 --- a/app/assets/javascripts/app/models/_application_model.coffee +++ b/app/assets/javascripts/app/models/_application_model.coffee @@ -816,17 +816,16 @@ set new attributes of model (remove already available attributes) ) @clearInMemory: -> - return if !@className + # reset callbacks to session based functions + @resetCallbacks() # reset attributes to prevent cached forms on relogin - if !_.isEmpty(App[@className].org_configure_attributes) - App[@className].configure_attributes = App[@className].org_configure_attributes + @resetAttributes() # reset cached values of model - App[@className].deleteAll() + @deleteAll() @updateAttributes: (attributes) -> - return if !@className if _.isEmpty(@org_configure_attributes) # use jquery instead of ._clone() because we need a deep copy of the obj