-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(prop-defs): add hidden option to property definitions #29085
base: master
Are you sure you want to change the base?
Changes from 5 commits
7e0849a
0d5f776
96e3063
b002853
4c1a568
08271a1
8051106
b0182a0
df7d08a
47fdd9e
63268e3
2f46373
12f860c
eecb4cd
916cc42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2.18 on 2025-02-21 04:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("ee", "0021_conversation_status"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="enterprisepropertydefinition", | ||
name="hidden", | ||
field=models.BooleanField(blank=True, default=False, null=True), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0021_conversation_status | ||
0022_enterprisepropertydefinition_hidden |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,6 +19,7 @@ class EnterprisePropertyDefinition(PropertyDefinition): | |||||
blank=True, | ||||||
related_name="property_verifying_user", | ||||||
) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd rather this go into the activity log tbh... and I don't feel like doing that now 😬 Is that cool with you or do you really think it should be included? |
||||||
hidden = models.BooleanField(blank=True, null=True, default=False) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider making hidden field non-nullable since it has a default value. This would simplify logic and prevent potential null checks.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good suggestion, same as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have to allow null I think so that the existing rows don't all have to be updated, if anything I would remove the default. Thoughts? |
||||||
|
||||||
# Deprecated in favour of app-wide tagging model. See EnterpriseTaggedItem | ||||||
deprecated_tags: ArrayField = ArrayField(models.CharField(max_length=32), null=True, blank=True, default=list) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider making null=False since default=False is provided. Having both nullable and a default value can lead to ambiguous states.