From: Sebastian Spaeth Date: Thu, 20 Dec 2012 22:10:07 +0000 (+0100) Subject: Remove SimpleFieldAlias X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=30bb4109bc960153b66019360e0ed3e83a2dec88;p=mediagoblin.git Remove SimpleFieldAlias It was only used for the model._id -> model.id conversion and is not needed anymore. Signed-off-by: Sebastian Spaeth --- diff --git a/mediagoblin/db/sql/models.py b/mediagoblin/db/sql/models.py index 8315d05c..4450e38d 100644 --- a/mediagoblin/db/sql/models.py +++ b/mediagoblin/db/sql/models.py @@ -44,18 +44,6 @@ from mediagoblin.db.sql.base import Session from migrate import changeset -class SimpleFieldAlias(object): - """An alias for any field""" - def __init__(self, fieldname): - self.fieldname = fieldname - - def __get__(self, instance, cls): - return getattr(instance, self.fieldname) - - def __set__(self, instance, val): - setattr(instance, self.fieldname, val) - - class User(Base, UserMixin): """ TODO: We should consider moving some rarely used fields