def ensure(self, command, reinit): admin = self.retrieve(settings.ADMIN_USER) if not admin: original_mute = command.mute command.mute = True admin = command.user_provider.create(settings.ADMIN_USER, {}) command.mute = original_mute Runtime.admin_user(admin)
def admin(self): return Runtime.admin_user()
def ensure(self, command, reinit): admin = self.retrieve(settings.ADMIN_USER) if not admin: admin = command.user_provider.create(settings.ADMIN_USER, {}) Runtime.admin_user(admin)