Commit abbe3c75 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

astakos: Set limits at enable time in migration

parent bbde07d6
......@@ -38,7 +38,7 @@ class Migration(DataMigration):
def make_base_project(self, orm, user):
chain = self.new_chain(orm)
proj = orm.Project.objects.create(
orm.Project.objects.create(
id=chain.chain,
uuid=user.uuid,
last_application=None,
......@@ -53,8 +53,6 @@ class Migration(DataMigration):
private=True,
is_base=True)
base_grants = self.base_resources(orm, user)
self.set_resources(proj, base_grants)
user.base_project_id = chain.chain
user.save()
......@@ -69,6 +67,8 @@ class Migration(DataMigration):
project.name = project.realname
project.state = ACTIVATED
project.save()
base_grants = self.base_resources(orm, user)
self.set_resources(project, base_grants)
self.new_membership(orm, project, user)
def forwards(self, orm):
......
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