[Patchew-devel] [PATCH 06/12] models: create Result model

Fam Zheng famz at redhat.com
Tue May 22 08:11:28 UTC 2018


On Tue, 05/22 08:57, Paolo Bonzini wrote:
> @@ -58,6 +140,7 @@ class Project(models.Model):
>                                         top project which has
>                                         parent_project=NULL""")
>      maintainers = models.ManyToManyField(User, blank=True)
> +    results = models.ManyToManyField(Result, blank=True)
>  
>      def __str__(self):
>          return self.name
> @@ -319,6 +402,7 @@ class Message(models.Model):
>      num_patches = models.IntegerField(null=False, default=-1, blank=True)
>  
>      objects = MessageManager()
> +    results = models.ManyToManyField(Result, blank=True)

Why ManyToMany relationship? A Result entry belongs to exactly one Project or
Message, just like Property, no?

Fam




More information about the Patchew-devel mailing list