fix(flags): allow no member for launchdarkly flag log#83045
fix(flags): allow no member for launchdarkly flag log#83045michellewzhang wants to merge 3 commits into
Conversation
| if result.get("member"): | ||
| created_by = result["member"]["email"] | ||
| else: | ||
| created_by = "unknown" |
There was a problem hiding this comment.
Remove this and allow the value to be null. Looks great!
There was a problem hiding this comment.
discussed on slack - since the createdBy field is required on the model, we'll need to migrate to allow it to be null. will do in a followup. but for now, we'll set it to the empty string.
see followup ticket for more context: #83050
| if result.get("member"): | ||
| created_by = result["member"]["email"] | ||
| else: | ||
| created_by = "" |
There was a problem hiding this comment.
why empty string instead of None?
There was a problem hiding this comment.
we're going to do this in a followup; it requires a migration since the createdBy column is non-nullable right now. see this ticket for more context:
There was a problem hiding this comment.
@michellewzhang If you want you can try writing a migration. Its not too difficult. To go from not null to null.
There was a problem hiding this comment.
There was a problem hiding this comment.
The command line is sentry django [django command...].
There was a problem hiding this comment.
Add null=True to these columns:
sentry/src/sentry/flags/models.py
Lines 75 to 76 in 132dcb6
And then run the normal migration commands.
There was a problem hiding this comment.
Optional of course, I can write one tomorrow.
relates to SENTRY-3M7C