Skip to content

Commit

Permalink
fix: search null error
Browse files Browse the repository at this point in the history
  • Loading branch information
yashsuhagiya committed Jan 8, 2024
1 parent 83b6f67 commit fa0b260
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ class Customer(models.Model):
mobile_no = models.BigIntegerField(null=False,blank=False)
gender = models.CharField(max_length=20,default="Male")
search = ArrayField(
base_field = models.CharField(max_length=10),
size = 5,
max_length = (5*11),
null=True
base_field=models.CharField(max_length=10),
size=5,
max_length=(5*11),
null=True,
default=list # or default=list() depending on Django version
)

address = models.ForeignKey(Address, on_delete=models.CASCADE, null=True)

def __str__(self):
Expand Down

0 comments on commit fa0b260

Please sign in to comment.