diff options
| author | Abhilash Raj | 2014-09-19 06:59:12 +0530 |
|---|---|---|
| committer | Abhilash Raj | 2014-09-19 06:59:12 +0530 |
| commit | 6dd2ac32ee1f1e8f588c08fd5363f0f794d0a6b1 (patch) | |
| tree | bf68d953616cd85bc14d3dee866998272fdfb506 /src/mailman/database | |
| parent | 917c7fab696151743e4765560d55565ec8e8e38e (diff) | |
| download | mailman-6dd2ac32ee1f1e8f588c08fd5363f0f794d0a6b1.tar.gz mailman-6dd2ac32ee1f1e8f588c08fd5363f0f794d0a6b1.tar.zst mailman-6dd2ac32ee1f1e8f588c08fd5363f0f794d0a6b1.zip | |
* fix the circular dependecy problem between User and Adress
* fix almost all the errors relating to doctests
Diffstat (limited to 'src/mailman/database')
| -rw-r--r-- | src/mailman/database/base.py | 12 | ||||
| -rw-r--r-- | src/mailman/database/types.py | 4 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py index b66513a2c..5eec853d6 100644 --- a/src/mailman/database/base.py +++ b/src/mailman/database/base.py @@ -107,18 +107,6 @@ class SABaseDatabase: self.store = session() self.store.commit() - # def initialize_testing(self): - # url = expand(config.database.url, config.paths) - # log.debug('Database url: %s', url) - # self.url = url - # self._prepare(url) - # self.engine = create_engine(url) - # connection = self.engine.connect() - # self.transaction = connection.begin_nested() - # self.store = Session(connection) - # self.store.commit() - - def load_migrations(self, until=None): """Load schema migrations. diff --git a/src/mailman/database/types.py b/src/mailman/database/types.py index 81721781d..a6f0b32ca 100644 --- a/src/mailman/database/types.py +++ b/src/mailman/database/types.py @@ -49,9 +49,7 @@ class Enum(TypeDecorator): def process_bind_param(self, value, dialect): if value is None: return None - if not isinstance(value, self.enum): - raise ValueError("{} must be a value of the {} enum".format( - value, self.enum.__name__)) + return value.value |
