Skip to content

Update pre-migration.py#746

Closed
Weltschmerz-dev wants to merge 1 commit intoOCA:17.0from
Weltschmerz-dev:patch-1
Closed

Update pre-migration.py#746
Weltschmerz-dev wants to merge 1 commit intoOCA:17.0from
Weltschmerz-dev:patch-1

Conversation

@Weltschmerz-dev
Copy link

First time contributor, hi 👋

Fixes runtime error due to invalid migration script.

Stacktrace:

File "/oca/server-auth/auth_session_timeout/migrations/17.0.1.0.0/pre-migration.py", line 6, in migrate
    env.cr.execute(
    ^^^^^^
  File "/odoo/odoo/odoo/sql_db.py", line 494, in __getattr__
    return getattr(self._obj, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'psycopg2.extensions.cursor' object has no attribute 'cr'

Fixes runtime error due to invalid migration script.
Copy link
Member

@amh-mw amh-mw left a comment

Choose a reason for hiding this comment

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

Code review only. Style coherent with core Odoo 17.0 pre-migrations.

@Bert-Proesmans
Copy link

I'm encountering this issue multiple times due to migration testing. How can I help accelerate the process towards merging?

@Weltschmerz-dev
Copy link
Author

Since figured out that this module is no longer useful in V17, as Odoo has implemented the added functionality this module had. I will be closing this Pull Request.

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.

3 participants