Do not allow empty category names#292
Merged
josecelano merged 1 commit intotorrust:developfrom Sep 14, 2023
josecelano:issue-288-do-not-allow-empty-categories
Merged
Do not allow empty category names#292josecelano merged 1 commit intotorrust:developfrom josecelano:issue-288-do-not-allow-empty-categories
josecelano merged 1 commit intotorrust:developfrom
josecelano:issue-288-do-not-allow-empty-categories
Conversation
It was allowed to use an empty string like "" or " " for a category name. From now on, it's not allowed. If there were some empty names in the database, they were not renamed. Admins must optionally do that. Names were anyway UNIQUE. A migration to rename empty names was not added because there can be more than one category, for example: - "" - " " - " " - Etcetera We could have generated names like "no category 1", "no category 2", but it's not likely that admins have created empty categories.
Member
Author
|
ACK c2b7488 |
Codecov Report
@@ Coverage Diff @@
## develop #292 +/- ##
===========================================
+ Coverage 43.56% 43.63% +0.06%
===========================================
Files 77 77
Lines 4320 4325 +5
===========================================
+ Hits 1882 1887 +5
Misses 2438 2438
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It was allowed to use an empty string like "" or " " for a category name.
From now on, it's not allowed.
If there were some empty names in the database, they were not renamed. Admins must optionally do that. Names were anyway UNIQUE.
A migration to rename empty names was not added because there can be more than one category, for example:
We could have generated names like "no category 1", "no category 2", but it's not likely that admins have created empty categories.