Skip to content

add model for 11.10.1-ce.0 #67

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

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

add model for 11.10.1-ce.0 #67

wants to merge 1 commit into from

Conversation

glensc
Copy link
Member

@glensc glensc commented Apr 29, 2019

No description provided.

@glensc glensc self-assigned this Apr 29, 2019
@glensc glensc force-pushed the model-11.10.1-ce.0 branch from b4f9e9a to 9a48324 Compare April 29, 2019 15:22
@glensc
Copy link
Member Author

glensc commented Apr 29, 2019

currently errors with:

Traceback (most recent call last):
  File "/home/glen/tracboat/VENV/bin/tracboat", line 11, in <module>
    load_entry_point('tracboat', 'console_scripts', 'tracboat')()
  File "/home/glen/tracboat/src/tracboat/cli.py", line 428, in main
    cli(obj={})  # pylint: disable=unexpected-keyword-arg,no-value-for-parameter
  File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/glen/tracboat/src/tracboat/cli.py", line 118, in wrapper
    return func(*args, **kwargs)
  File "/home/glen/tracboat/src/tracboat/cli.py", line 168, in wrapper
    return func(*args, **kwargs)
  File "/home/glen/tracboat/VENV/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/glen/tracboat/src/tracboat/cli.py", line 418, in migrate
    svn2git_revisions=svn2git_revisions,
  File "/home/glen/tracboat/src/tracboat/migrate.py", line 428, in migrate
    db_model = model.get_model(gitlab_version)
  File "/home/glen/tracboat/src/tracboat/gitlab/model/__init__.py", line 16, in get_model
    return importlib.import_module(module_path)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/glen/tracboat/src/tracboat/gitlab/model/model1110.py", line 345, in <module>
    class PoolRepositories(BaseModel):
  File "/home/glen/tracboat/src/tracboat/gitlab/model/model1110.py", line 349, in PoolRepositories
    source_project = ForeignKeyField(db_column='source_project_id', null=True, rel_model=Projects, to_field='id', unique=True)
NameError: name 'Projects' is not defined

@aroth-arsoft
Copy link

This error looks like a "missing-forward-declaration" issue. PoolRepositories requires the definition of Projects, but Projects require the definition of PoolRepositories.

@aroth-arsoft
Copy link

I played around a bit and use the solution as suggested at https://www.tutorialspoint.com/How-do-we-handle-circular-dependency-between-Python-classes. See my fixes in by fork: https://github.com/aroth-arsoft/tracboat

BTW: i had to change all rel_model= to model= otherwise peewee complains about a missing positional parameter model.

@glensc
Copy link
Member Author

glensc commented Aug 24, 2020

well, send your changes as PR then

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