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

Korjaa olemassa olevien kaavamääräysryhmien lisääminen #204

Conversation

nmaarnio
Copy link
Collaborator

No description provided.

@nmaarnio nmaarnio added the bug Something isn't working label Feb 25, 2025
@nmaarnio nmaarnio linked an issue Feb 25, 2025 that may be closed by this pull request
Copy link
Contributor

@LKajan LKajan left a comment

Choose a reason for hiding this comment

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

Mulla meni vähän liian kauan kunnes ymmärsin mitä tossa ehdossa tarkistetaan. Saisiko sitä selkeytettyä erillisellä funktiolla, jolla selkeä nimi tai vähintään jollain kommentilla?

Comment on lines 117 to 130
if (
not (
reg_group_widget.regulation_group.id_ and short_name == reg_group_widget.regulation_group.short_name
)
and short_name in self.existing_group_short_names
):
Copy link
Contributor

Choose a reason for hiding this comment

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

Mun oli vaikea ymmärtää mitä tässä tarkistetaan. Saisiko ehtoa selkeytettyä jotenkin näin?

Suggested change
if (
not (
reg_group_widget.regulation_group.id_ and short_name == reg_group_widget.regulation_group.short_name
)
and short_name in self.existing_group_short_names
):
def is_existing_model_with_unmodified_short_name(model, short_name):
return model.id_ and short_name == model.short_name
if (
not is_existing_model_with_unmodified_short_name(reg_group_widget.regulation_group, short_name)
and short_name in self.existing_group_short_names
):

@nmaarnio nmaarnio force-pushed the 203-olemassa-olevaa-kaavamääräysryhmää-ei-voi-lisätä-kaavakohteelle branch from 85f000a to 9c8d8d4 Compare February 27, 2025 07:25
@LKajan LKajan merged commit 64f528f into main Feb 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Olemassa olevaa kaavamääräysryhmää ei voi lisätä kaavakohteelle
2 participants