Comment 1 for bug 1835426

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

The bug still exists in the charm-interface-keystone-fid-service-provider interface in provides.py at line 78:

    def publish(self, protocol_name, remote_id_attribute):
        # get the first relation object as we only have one relation
        # to a primary as a subordinate
        rel = self.relations[0]
        # can have multiple dashboard charms in general, therefore,
        # all relation objects and all units must be handled
        # to_publish/relation_set work on a per-relation basis
        rel.to_publish['protocol-name'] = protocol_name
        rel.to_publish['remote-id-attribute'] = remote_id_attribute

Easiest fix is just to check that self.relations has at least one element or wrap it in a try: except: