aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-27 11:53:42 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-09-19 08:12:10 -0700
commitf4f84297efeacb3da96e94e84720e8f529b4b3a0 (patch)
tree11909a21643d30cf1dd6cf8fbc6f97211922bb50 /mediagoblin/db/models.py
parent7f9d3ca7c9e4934c3ee487a0f1d10e1b6525db71 (diff)
downloadmediagoblin-f4f84297efeacb3da96e94e84720e8f529b4b3a0.tar.lz
mediagoblin-f4f84297efeacb3da96e94e84720e8f529b4b3a0.tar.xz
mediagoblin-f4f84297efeacb3da96e94e84720e8f529b4b3a0.zip
make all JSONEncoded columns mutable
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index 10558c5f..a1328370 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -48,6 +48,8 @@ from migrate import changeset
_log = logging.getLogger(__name__)
+MutationDict.associate_with(JSONEncoded)
+
class User(Base, UserMixin):
"""
@@ -393,7 +395,7 @@ class MediaFile(Base):
nullable=False)
name_id = Column(SmallInteger, ForeignKey(FileKeynames.id), nullable=False)
file_path = Column(PathTupleWithSlashes)
- file_metadata = Column(MutationDict.as_mutable(JSONEncoded))
+ file_metadata = Column(JSONEncoded)
__table_args__ = (
PrimaryKeyConstraint('media_entry', 'name_id'),