#4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!))
by Sharif Mehedi · in Developers · assigned to Sharif Mehedi
Kurzbeschreibung
Kinder
Kommentare
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : Okay! The situation is NOT that crazy! The workflow actions changes because of the code [url gitlab.com/lino-framework/xl/-/blob/128d3f0f87b522bcc865a40dc94760bf06998224/lino_xl/lib/cal/models.py#L782 here]. I am wondering why are we changing the state of an Event like this. In my opinion this if st...
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : This is because for some reason the workflow button action references are wrong.
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : workflow buttons does NOT work on react with this change.
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : [url gitlab.com/lino-framework/lino/-/commit/c43f5e0a5dcfc4914607966a8b8258aa28c5cd52 commit]
- 4 Jahre, 6 Monate ago von Luc Saffre Antwort auf Luc Saffre about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : Regarding dragons: keep it in a single commit so we can review it more easily in case of later problems.
- 4 Jahre, 6 Monate ago von Luc Saffre about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) (1 Antwort) : Be careful. Here dragons.
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : I think the solution to this issue would be to call `before_ui_save` from `save_existing_instance` passing in ar and change_watcher and NOT call it from `save_watched_instance`.
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : Whereas in the [url dev.lino-framework.org/dev/update.html?highlight=before_ui_save#lino.core.model.Model.before_ui_save documentation] it is stated that "code to be executed each time an instance of this model gets updated", also from documentation `pre_ui_save` get called the same way as `before_u...
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : I think this is an oversight that we do NOT call before_ui_save on every update.
- 4 Jahre, 6 Monate ago von Sharif Mehedi about #4466 (`before_ui_save` is called on `new_instances` or `watched_instances` but NOT on already existing object update(!)) : The exact places where we call `before_ui_save`, [url gitlab.com/lino-framework/lino/-/blob/master/lino/core/model.py#L462 save_new_instance], [url gitlab.com/lino-framework/lino/-/blob/master/lino/core/model.py#L475 save_watched_instance] and [url gitlab.com/lino-framework/lino/-/blob/master/lino/c...