Skip to content

Commit

Permalink
Merge pull request #642 from awesto/releases/0.11.x
Browse files Browse the repository at this point in the history
Releases/0.11.x
  • Loading branch information
jrief committed Aug 24, 2017
2 parents e89a410 + 60eb1d5 commit 13f42e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ oauthlib==1.0.3
Pillow==3.3.0
pluggy==0.3.1
py==1.4.30
Pygments==2.0.2
python-dateutil==2.6.0
python-openid==2.2.5
pytz==2015.7
Expand Down
5 changes: 4 additions & 1 deletion shop/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def deconstruct(self):
return name, path, args, kwargs

def from_db_value(self, value, expression, connection, context):
return self.enum_type(value)
try:
return self.enum_type(value)
except ValueError:
return value

def get_prep_value(self, state):
if isinstance(state, self.enum_type):
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ commands = coverage report

[testenv:docs]
deps =
enum34
django==1.10.7
-r{toxinidir}/requirements/common.txt
Sphinx==1.4.5
sphinx-rtd-theme==0.1.9
six==1.9.0
beautifulsoup4==4.4.1
Jinja2==2.8
MarkupSafe==0.23
alabaster==0.7.9
babel==2.3.4
docutils==0.12
imagesize==0.7.1
snowballstemmer==1.2.1
pytz==2015.7
Pygments==2.1.3
commands=
sphinx-build -W -b html -d {envtmpdir}/doctrees {toxinidir}/docs {envtmpdir}/html

0 comments on commit 13f42e9

Please sign in to comment.