Skip to content

Commit

Permalink
allow empty array for override ids
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-codecov committed Feb 22, 2024
1 parent 1d38f3c commit 6abadbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions shared/django_apps/rollouts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Generated by Django 4.2.7 on 2024-02-22 15:42
# Generated by Django 4.2.7 on 2024-02-22 16:21

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models

import shared.django_apps.rollouts.models


Expand Down Expand Up @@ -64,13 +65,19 @@ class Migration(migrations.Migration):
(
"override_owner_ids",
django.contrib.postgres.fields.ArrayField(
base_field=models.IntegerField(), default=list, size=None
base_field=models.IntegerField(),
blank=True,
default=list,
size=None,
),
),
(
"override_repo_ids",
django.contrib.postgres.fields.ArrayField(
base_field=models.IntegerField(), default=list, size=None
base_field=models.IntegerField(),
blank=True,
default=list,
size=None,
),
),
(
Expand Down
4 changes: 2 additions & 2 deletions shared/django_apps/rollouts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class FeatureFlagVariant(models.Model):

# Weak foreign keys to Owner and Respository models respectively
override_owner_ids = fields.ArrayField(
base_field=models.IntegerField(), default=list
base_field=models.IntegerField(), default=list, blank=True
)
override_repo_ids = fields.ArrayField(
base_field=models.IntegerField(), default=list
base_field=models.IntegerField(), default=list, blank=True
)

class Meta:
Expand Down

0 comments on commit 6abadbf

Please sign in to comment.