-
-
Notifications
You must be signed in to change notification settings - Fork 63
[FIX] connector_search_engine: Set sync_state to 'to_update' when reactivating an inactive binding #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ctivating an inactive binding
This PR has the |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
@simahawk @sebastienbeau can someone merge this one ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work. Could you please keep commit msg shorter and keep explanations for the long description?
Eg:
connector_search_engine: fix state on binding re-activate
When a binding is re-activated it's state should be set to `to_update`
so that it will get exported when needed.
|
||
def write(self, vals): | ||
not_new = self.browse() | ||
if "active" in vals and not vals["active"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is enough. IMO in case a record is re-activated the json data should be recomputed first -> this will lead to proper state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right.
What we need to do is if the field is we have vals["active"] is to call jobify_recompute_json(force_export=True) and this job will update the json and then set it to_update
When a binding is deactivated, its state is set to
to_update
but when it's reactivated nothing happens.This PR sets the state to
to_update
when the binding is set to active again.