Removed print statement that was just printing 'JHS: Host: Host object' for every object when running migration.

This commit is contained in:
Chris Church
2014-07-14 18:33:12 -04:00
parent 32822f43d3
commit 4f33a01b02

View File

@@ -8,15 +8,12 @@ from django.db import models
class Migration(DataMigration): class Migration(DataMigration):
def forwards(self, orm): def forwards(self, orm):
idx = 0 for idx, jhs in enumerate(orm.JobHostSummary.objects.all()):
for jhs in orm.JobHostSummary.objects.all():
print "JHS: Host: " + str(jhs.host)
if jhs.host is not None and jhs.host.active: if jhs.host is not None and jhs.host.active:
jhs.host_name = jhs.host.name jhs.host_name = jhs.host.name
else: else:
jhs.host_name = "tower_deleted_host-%s" % str(idx) jhs.host_name = "tower_deleted_host-%s" % unicode(idx)
jhs.save() jhs.save()
idx += 1
def backwards(self, orm): def backwards(self, orm):
print("Not reversing jobhoststatus host_name field") print("Not reversing jobhoststatus host_name field")