Commit bd12c3a5 authored by Arnaud Fabre's avatar Arnaud Fabre
Browse files

fixes memopol with last applications updates

parent 6d15512b
...@@ -33,15 +33,14 @@ class Command(BaseCommand): ...@@ -33,15 +33,14 @@ class Command(BaseCommand):
except MGroup.DoesNotExist: except MGroup.DoesNotExist:
mgroup = MGroup(group_ptr=mandate.group) mgroup = MGroup(group_ptr=mandate.group)
mgroup.__dict__.update(mandate.group.__dict__) mgroup.__dict__.update(mandate.group.__dict__)
mgroup.save() mgroup.save()
#print(mgroup)
mmandate.mgroup = mgroup mmandate.mgroup = mgroup
mmandate.save() mmandate.save()
mmandate.update_active() mmandate.update_active()
mrepresentative.update_country() mrepresentative.update_country()
mrepresentative.update_active() # mrepresentative.update_active()
mrepresentative.save() mrepresentative.save()
print("%s/%s\r" % (i, n)), print("%s/%s\r" % (i, n)),
......
...@@ -36,7 +36,6 @@ class Migration(migrations.Migration): ...@@ -36,7 +36,6 @@ class Migration(migrations.Migration):
name='MRepresentative', name='MRepresentative',
fields=[ fields=[
('representative_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='representatives.Representative')), ('representative_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='representatives.Representative')),
('active', models.BooleanField(default=False)),
('country', models.ForeignKey(to='representatives.Country', null=True)), ('country', models.ForeignKey(to='representatives.Country', null=True)),
], ],
options={ options={
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment