def commit(self):
        super(LobbyistScraperDictStorage, self).commit()
        data = self._data
        source_id = data['id']
        data['represents'] = self._get_represents_data(source_id)
        full_name = '%s %s' % (data['first_name'], data['family_name'])
        q = Lobbyist.objects.filter(source_id=source_id, person__name=full_name)
        if 0 > q.count():
            lobbyist = q[0]
        else:
            lobbyist = Lobbyist.objects.create(person=Person.objects.create(name=full_name), source_id=source_id)
        self._data = lobbyist
        last_lobbyist_data = self._get_last_lobbyist_data(lobbyist, data)
        if last_lobbyist_data is None:
            kwargs = {}
            for key in self._get_data_keys():
                kwargs[key] = data[key]
            kwargs['source_id'] = source_id
            lobbyist_data = LobbyistData.objects.create(**kwargs)
            for represent in data['represents']:
                lobbyist_data.represents.add(represent)
            lobbyist_data.scrape_time = datetime.now()
            lobbyist_data.save()
            lobbyist.data.add(lobbyist_data)
        else:
            lobbyist.data.add(last_lobbyist_data)
        lobbyist.save()
dataset/ETHPy150Open ofri/Open-Knesset/lobbyists/scrapers/lobbyist.py/LobbyistScraperDictStorage.commit/swapped operands of `>`