Fixed issue #1856 as a follow up of issue #949: Unpermitted customer field in customer create ticket view.

This commit is contained in:
Thorsten Eckel 2018-03-06 12:25:48 +01:00
parent 0d644ea7c7
commit 414d739ff8
2 changed files with 4 additions and 9 deletions

View file

@ -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()

View file

@ -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