Commit b413031e authored by Joshua Bachmeier's avatar Joshua Bachmeier

Replace invalid attribute access with dict access

rsp.json() returns a dict!
parent 63b8093d
......@@ -276,11 +276,12 @@ class Group:
def create(self):
rsp = BWIDM.get('group-admin', 'create', CONFIG['backend.bwidm.service']['name'], self.name).json()
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
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