def invoke(self, *args, **options): domain = options['domain'] slug = slugify.slugify(options['nexus'], to_lower=True) organization_ = organization.get(domain=domain) if organization_ == None: raise CommandError("unknown organization '%s'" % domain) nexus_ = nexus.get(slug=slug, organization=organization_) if nexus_ == None: raise CommandError("unknown nexus '%s'" % slug) agora_.create(nexus_)