Update projects when a new primary is set.

This commit is contained in:
Luke Sneeringer
2015-01-28 12:08:43 -06:00
parent acb061f0be
commit 00a38fd75f
3 changed files with 24 additions and 3 deletions

View File

@@ -57,5 +57,9 @@ class Command(BaseCommandInstance):
instance = Instance(uuid=uuid, primary=self.is_option_primary(), hostname=self.get_option_hostname())
instance.save()
# If this is a primary instance, update projects.
if instance.primary:
self.update_projects(instance)
# Done!
print('Successfully registered instance %s.' % instance_str(instance))