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

allow to create network_prefixes with the same prefix #1522

Conversation

Ivanov-Anton
Copy link
Collaborator

@Ivanov-Anton Ivanov-Anton commented Jul 25, 2024

Description

allow to create network_prefixes with the same prefix but diff length of number

closes #1521

db/structure.sql Outdated Show resolved Hide resolved
@Ivanov-Anton Ivanov-Anton force-pushed the 1521-Network-prefixes-check-number-length branch 3 times, most recently from 15caa5e to fef162b Compare July 26, 2024 05:45
@Ivanov-Anton Ivanov-Anton changed the title allow to create network_prefixes with the same prefix but diff length… allow to create network_prefixes with the same prefix Jul 26, 2024
validates :network, presence: true
validate :prefix_unique_validation, if: :prefix?, on: :create
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we validate on update too?

@Ivanov-Anton Ivanov-Anton force-pushed the 1521-Network-prefixes-check-number-length branch 3 times, most recently from ebdb345 to 12ae787 Compare July 26, 2024 21:36
@Ivanov-Anton Ivanov-Anton force-pushed the 1521-Network-prefixes-check-number-length branch from 12ae787 to bfecd20 Compare July 26, 2024 21:43
@dmitry-sinina dmitry-sinina merged commit f675c0a into yeti-switch:master Jul 27, 2024
12 checks passed
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.

System->Network prefixes, check number length
2 participants