Commit 26922f9f authored by marcus.hardt's avatar marcus.hardt

Merge branch 'fix-invalid-attr-access' into 'master'

Fix invalid attr access

See merge request !27
parents 62982d7a b413031e
......@@ -276,15 +276,12 @@ class Group:
def create(self):
rsp = BWIDM.get('group-admin', 'create', CONFIG['backend.bwidm.service']['name'], self.name).json()
try:
if self.name != rsp.name:
logger.warning("Groupname changed from {} to {} by BWIDM".format(self.name, rsp.name))
self.name = rsp.name
except AttributeError as e:
logger.error(F"Did not obtain a json with group name back: {e}")
logger.error(F"What is got is {rsp}")
self.id = rsp.id
if self.name != rsp['name']:
logger.warning("Groupname changed from {} to {} by BWIDM".format(self.name, rsp['name']))
self.name = rsp['name']
self.id = rsp['id']
def delete(self):
# groupdel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment