def systems_by_scope(self, scope):
        keyvalue_pairs = KeyValue.objects.filter(key__contains='dhcp_scope',value=scope).filter(key__startswith='nic.')
        #Iterate through the list and get all of the key/value pairs
        tmp_list = []
        for row in keyvalue_pairs:
            keyvalue = KeyValue.objects.filter(system=row.system)
            tmp_dict = {}
            for kv in keyvalue:
                tmp_dict[kv.key] = kv.value
            tmp_dict['hostname'] = row.system.hostname
            appendable = True
            for the_items in tmp_list:
                if the_items not in 'hostname':
                    appendable = True
                elif the_items['hostname'] == row.system.hostname:
                    appendable = False
            if appendable is True:
                tmp_list.append(tmp_dict)
        return tmp_list
dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/libs/DHCPHelper.py/DHCPHelper.systems_by_scope/swapped operands of `not in`