-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Add remove tribe on townsquare #7152
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7152 +/- ##
==========================================
+ Coverage 26.21% 26.24% +0.03%
==========================================
Files 296 296
Lines 29258 29277 +19
Branches 4321 4323 +2
==========================================
+ Hits 7669 7683 +14
- Misses 21313 21323 +10
+ Partials 276 271 -5
Continue to review full report at Codecov.
|
app/dashboard/models.py
Outdated
@@ -2788,7 +2788,7 @@ class Profile(SuperModel): | |||
last_validation_request = models.DateTimeField(blank=True, null=True, help_text=_("When the user requested a code for last time ")) | |||
encoded_number = models.CharField(max_length=255, blank=True, help_text=_('Number with the user validate the account')) | |||
sybil_score = models.IntegerField(default=-1) | |||
|
|||
ignore_tribes = ArrayField(models.IntegerField(), 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.
Why use an ArrayField
here instead of a ManyToManyField
? Will cause problems if a tribe is later removed and we aren't cascading the deletion down to the reference.
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.
I used the ArrayField
because the spec in the issue requests for one object to store the ignored tribes. I got your point, at this moment doesn't matter if a tribe is deleted because all ids in this list will be excluded
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.
I used the ArrayField
because the spec in the issue requests for one object to store the ignored tribes. I got your point, at this moment doesn't matter if a tribe is deleted because all ids in this list will be excluded
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.
Replaced with ManyToMany
@zoek1 Conceptually looks good - looks like Travis doesn't like it, possibly the model setup or migrations, please take a look |
…into feature/remove-tribe
Conflicts fixed @danlipert |
Description
https://www.loom.com/share/8f3829efefc14c87a731c14bd8a2fd40
Refers/Fixes
#6424
Testing