Skip to content
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

[FIX] fields: Handle invalid domains #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nseinlet
Copy link
Contributor

Some filters are simply invalid, and leads to a traceback when removing fields in them.

@nseinlet nseinlet requested a review from KangOl November 16, 2023 08:28
context = safe_eval(context_s or "{}", SelfPrintEvalContext(), nocopy=True)
except SyntaxError:
cr.execute("DELETE FROM ir_filters WHERE id = %s", [id_])
add_to_migration_reports(("ir.filters", id_, name), "Filters/Dashboards")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The report actually says that the filter has been corrected.
It also adds a 404 link to the removed record.
Also, why removing the filter? I would simply skip it (with a logger.warning).

try:
context = safe_eval(context_s or "{}", SelfPrintEvalContext(), nocopy=True)
except SyntaxError:
cr.execute("DELETE FROM ir_filters WHERE id = %s", [id_])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cr.execute("DELETE FROM ir_filters WHERE id = %s", [id_])
cr.execute("DELETE FROM ir_filters WHERE id = %s", [id_])

Don't your editor automatically remove the trailing spaces?

@xmo-odoo
Copy link
Contributor

@robodoo check

@robodoo
Copy link
Contributor

robodoo commented Nov 16, 2023

@robodoo
Copy link
Contributor

robodoo commented Nov 16, 2023

I'm sorry, @xmo-odoo. I'm afraid I can't do that.

@robodoo
Copy link
Contributor

robodoo commented Nov 16, 2023

@nseinlet I didn't know about this PR and had to retrieve its information, you may have to re-approve it as I didn't see previous commands.

Some filters are simply invalid, and leads to a traceback when removing fields in them.
@nseinlet nseinlet force-pushed the master-checkdomaincontext-nse branch from 717cd3f to d1c83e4 Compare January 22, 2024 13:07
@KangOl
Copy link
Contributor

KangOl commented Jan 22, 2024

upgradeci retry with always only hr project stock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants