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] change regex method to allow odoo saas #109

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

Conversation

imlopes
Copy link

@imlopes imlopes commented Sep 23, 2022

self.major_version = re.match(r'\d+\.?\d*', ver).group()

The regex seems not to work with the "match" method (the saas odoo version is something like saas~15.2+e).

AttributeError: 'NoneType' object has no attribute 'group'

If you change "match" to "search", it works with the saas version.

https://github.com/tinyerp/erppeek/blob/9a43eb9a07919db90ed8b8f2350f96a45bc63df1/erppeek.py#L520

The regex seems not to work with the "match" method (the saas odoo version is something like saas~15.2+e).

`AttributeError: 'NoneType' object has no attribute 'group'`

If you change "match" to "search", it works with the saas version.
@badbole
Copy link

badbole commented Oct 9, 2024

good catch.. i just faced the same issue and can confirm that this solution vorks fine,
until this PR is merged i will just monkeypatch my scripts

Cheers and congrats on succefuly squashing the bug :)

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.

2 participants