Browse files

[#1047] Only match individuals where they are not the same as the emp…

…loyer field
  • Loading branch information...
1 parent 110a5ed commit 087a0bd08db01287ac80a9a66781214b7dae5a18 Alison Rowland committed Apr 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 dcentity/matching/management/commands/match_lobbyist_bundlers__individuals.py
View
3 dcentity/matching/management/commands/match_lobbyist_bundlers__individuals.py
@@ -1,12 +1,13 @@
from dcentity.matching.management.base.matching import MatchingCommand
from dcdata.contribution.models import LobbyistBundle
from dcentity.models import Entity
+from django.db.models import F
class Command(MatchingCommand):
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
- self.subject = LobbyistBundle.objects
+ self.subject = LobbyistBundle.objects.exclude(name=F('employer'))
self.subject_name_attr = 'name'
self.subject_id_type = 'integer'

0 comments on commit 087a0bd

Please sign in to comment.