Skip to content

Commit

Permalink
Make addresses optional in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
patrys committed Sep 7, 2015
1 parent 10591e3 commit 43ebaf9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions saleor/userprofile/migrations/0002_auto_20150907_0602.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('userprofile', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='user',
name='addresses',
field=models.ManyToManyField(to='userprofile.Address', blank=True),
),
]
2 changes: 1 addition & 1 deletion saleor/userprofile/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def store_address(self, user, address, billing=False, shipping=False):
@python_2_unicode_compatible
class User(PermissionsMixin, models.Model):
email = models.EmailField(unique=True)
addresses = models.ManyToManyField(Address)
addresses = models.ManyToManyField(Address, blank=True)
is_staff = models.BooleanField(
pgettext_lazy('User field', 'staff status'),
default=False)
Expand Down

0 comments on commit 43ebaf9

Please sign in to comment.