Skip to content

Commit

Permalink
Fix #63
Browse files Browse the repository at this point in the history
  • Loading branch information
n.lyubchich committed Jul 21, 2015
1 parent d718d87 commit 22a9348
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 3 additions & 4 deletions project/admin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ def __init__(self, *, create_form, update_form=None, model,
self.success_url = success_url

def _clean_data(self, data):
_data = data
for (k, v) in _data:
if k not in self.model.__dict__:
_data.pop(k, None)

_data = {k: v for k, v in data.items() if k in self.model.__dict__}

return _data

def get(self, entry_id):
Expand Down
8 changes: 6 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ anyjson==0.3.3
billiard==3.3.0.20
blinker==1.3
celery==3.1.18
coverage==3.7.1
decorator==3.4.2
flake8==2.4.1
Flask==0.10.1
Expand All @@ -25,7 +26,12 @@ pep8==1.5.7
phonenumbers==7.0.7
psycopg2==2.6.1
pyflakes==0.8.1
python-coveralls==2.5.0
pytz==2015.4
PyYAML==3.11
redis==2.10.3
requests==2.7.0
sh==1.11
six==1.9.0
SQLAlchemy==1.0.6
SQLAlchemy-Utils==0.30.12
Expand All @@ -34,5 +40,3 @@ Werkzeug==0.10.4
wheel==0.24.0
WTForms==2.0.2
WTForms-Components==0.9.7
python-coveralls==2.5.0
coverage==3.7.1

0 comments on commit 22a9348

Please sign in to comment.