diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2013-03-22 17:11:12 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2013-03-22 17:11:12 -0500 |
commit | 5c83a40c5be862fef68d13179652e479f73b4560 (patch) | |
tree | 516db6e51323a977200c5a4841b48c3a23892a6d | |
parent | f113d90043b4844abb8a3ba3fdd325254281d048 (diff) | |
download | bcfg2-5c83a40c5be862fef68d13179652e479f73b4560.tar.gz bcfg2-5c83a40c5be862fef68d13179652e479f73b4560.tar.bz2 bcfg2-5c83a40c5be862fef68d13179652e479f73b4560.zip |
migrate_dbstats: Fix traceback found by jonten
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
-rwxr-xr-x | tools/upgrade/1.3/migrate_dbstats.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/upgrade/1.3/migrate_dbstats.py b/tools/upgrade/1.3/migrate_dbstats.py index 69d9514df..cbd2a6099 100755 --- a/tools/upgrade/1.3/migrate_dbstats.py +++ b/tools/upgrade/1.3/migrate_dbstats.py @@ -246,6 +246,9 @@ def _restructure(): failures = [] int_count = legacy_models.Interaction.objects.count() + if int_count == 0: + logger.error("Found no legacy interactions") + return False int_ctr = 0 start_time = 0 for inter in BatchFetch(legacy_models.Interaction.objects.\ |