Skip to content

Commit

Permalink
[mod] remove the 'clean_old_stuff' from the importation script, was b…
Browse files Browse the repository at this point in the history
…uggy and useless
  • Loading branch information
Psycojoker committed Jul 28, 2011
1 parent f57bf43 commit fb4d1a8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions parltrack/current_meps_json_2_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,6 @@ def manage_mep(mep, mep_json):
print " save mep modifications"
mep.save()

def clean_old_stuff():
print
print "* remove empty delegations"
Delegation.objects.annotate(meps=Count('mep')).filter(meps=0).delete()
print "* remove empty committees"
Committee.objects.annotate(meps=Count('mep')).filter(meps=0).delete()
print "* remove empty organizations"
Organization.objects.annotate(meps=Count('mep')).filter(meps=0).delete()

def add_missing_details(mep, mep_json):
mep.ep_id = mep_json["UserID"]

Expand Down Expand Up @@ -343,7 +334,6 @@ def create_mep(mep_json):
manage_mep(mep, mep_json)
else:
mep = create_mep(mep_json)
clean_old_stuff()

# TODO
# need to check all the existant building and to remove the empty one
Expand Down

0 comments on commit fb4d1a8

Please sign in to comment.