OpenSlides / OpenSlides/openslides-meta

Prevent identical names for generic relations with validate.py

Open Beginner friendly
#429 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PLpgSQL
Stars
0
Forks
25
Avg merge
1d 2h
Merged PRs (30d)
12

Description

Fields like history_entry/model_id get columns within the same table of that collection in the shape of model_id_user_id and model_id_motion_id. This could theoretically lead to doubling of column names. We should have a check for this in validate.py.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading validate.py and trace how generic relation fields are converted into column names. Add a validation check for duplicate generated names such as model_id_user_id and model_id_motion_id, then verify that the validator reports this collision.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.