From 396f39c3e9e5346b4b2e86f6bcce9cdb0c6ee683 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 29 Jan 2012 17:05:16 -0600 Subject: [PATCH] Fix database_current_version for when self.migration_data is None. --- mediagoblin/db/sql/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mediagoblin/db/sql/util.py b/mediagoblin/db/sql/util.py index 87234019..cb8fbf0d 100644 --- a/mediagoblin/db/sql/util.py +++ b/mediagoblin/db/sql/util.py @@ -97,6 +97,10 @@ class MigrationManager(object): if not self.migration_table.exists(self.database.bind): return None + # Also return None if self.migration_data is None. + if self.migration_data is None: + return None + return self.migration_data.version def set_current_migration(self, migration_number): -- 2.25.1