Skip to content

Remove merge mistake#498

Closed
ostcar wants to merge 2 commits into
OpenSlides:feature/votefrom
ostcar:merge_fix
Closed

Remove merge mistake#498
ostcar wants to merge 2 commits into
OpenSlides:feature/votefrom
ostcar:merge_fix

Conversation

@ostcar
Copy link
Copy Markdown
Member

@ostcar ostcar commented May 3, 2026

The field ballot/meeting_id was added in a merge commit. This seams like a merge error.

I don't see, that the field is needed, it since it was added in a merge commit, there was no discussion. I remove it for now, since its a blocker for other issues.

If it should be added, please do so in a pr (not a merge)

ostcar added 2 commits May 3, 2026 15:30
The field ballot/meeting_id was added in a merge commit. This seams
like a merge error.

I don't see, that the field is needed, it since it was added in a merge
commit, there was no discussion. I remove it for now, since its a
blocker for other issues.

If it should be added, please do so in a pr (not a merge)
@ostcar
Copy link
Copy Markdown
Member Author

ostcar commented May 3, 2026

@hjanott When I try to create the schema, i get an error:

make generate-relational-schema
python -m src.generate_sql_schema
Traceback (most recent call last):
  File "/home/ossi/src/openslides-go/meta/dev/src/helper_get_names.py", line 510, in get_models
    return cls.MODELS[collection]["fields"][field]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'meeting_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/ossi/src/openslides-go/meta/dev/src/generate_sql_schema.py", line 2833, in <module>
    main()
    ~~~~^^
  File "/home/ossi/src/openslides-go/meta/dev/src/generate_sql_schema.py", line 2769, in main
    ) = GenerateCodeBlocks.generate_the_code()
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/ossi/src/openslides-go/meta/dev/src/generate_sql_schema.py", line 199, in generate_the_code
    result, error = method_or_str(table_name, fname, fdata, type_)
                    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ossi/src/openslides-go/meta/dev/src/generate_sql_schema.py", line 563, in get_relation_type
    cls.get_trigger_check_equal_fields_for_1_x(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        own_table_field, foreign_table_field, state
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ossi/src/openslides-go/meta/dev/src/generate_sql_schema.py", line 997, in get_trigger_check_equal_fields_for_1_x
    own_table, own_with_update = cls.get_equal_field_trigger_config(
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        own_table_field, [own_table_field, equal_field]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ossi/src/openslides-go/meta/dev/src/generate_sql_schema.py", line 974, in get_equal_field_trigger_config
    field_def = InternalHelper.get_models(collection, field)
  File "/home/ossi/src/openslides-go/meta/dev/src/helper_get_names.py", line 512, in get_models
    raise Exception(f"MODELS field {collection}.{field} doesn't exist")
Exception: MODELS field ballot.meeting_id doesn't exist
make: *** [Makefile:43: generate-relational-schema] Fehler 1

Why is ballot.meeting_id an required field?

@hjanott
Copy link
Copy Markdown
Member

hjanott commented May 4, 2026

Why is ballot.meeting_id an required field?

I think @bastianjoel ran into a similar error. What I suppose is that the meeting_id is set as an equal_field for another relation since get_trigger_check_equal_fields_for_1_x is called. Thus it must be required. Either you leave the meeting_id in or remove that equal constraint too.

@bastianjoel
Copy link
Copy Markdown
Member

This was correctly part of a merge commit as there were new constraints added that made this field required. Therefore adding this field was necessary to merge current main.

@bastianjoel bastianjoel closed this May 4, 2026
@bastianjoel
Copy link
Copy Markdown
Member

Also please do not change formatting without doing changes. This makes updating the branch a pain.

We are aware about the array formatting and already have #487 ready.

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