Allow passing none as the project id, this is convenient for layers
which belong to projects already and therefore have their own project
field.
Add documentation string to function
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
return self.commit
return 'N/A'
- def get_detailspage_url(self, project_id):
+ def get_detailspage_url(self, project_id=None):
+ """ returns the url to the layer details page uses own project
+ field if project_id is not specified """
+
+ if project_id is None:
+ project_id = self.project.pk
+
return reverse('layerdetails', args=(project_id, self.pk))
def get_alldeps(self, project_id):