Commit c507ed36 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

fix root_collection

parent 61bb2ef0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -63,7 +63,10 @@ class Project(models.Model):

    @property
    def root_collection(self) -> "Collection":
        col, _ = Collection.objects.get_or_create(project=self, parent=None)
        col, created = Collection.objects.get_or_create(project=self, parent=None)
        if created:
            col.title = "root {}".format(self.label)
            col.save()
        return col