Commit fd283ba3 authored by Alice's avatar Alice

Change the name of resource field.

parent 9fa7c58b
......@@ -220,7 +220,7 @@ class Request (Model):
class BrokenLink(Model):
submitter = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="brokenlink_submitter")
resource_id = models.ForeignKey(Resource, null=True, on_delete=models.CASCADE, related_name="resource_id")
resource = models.ForeignKey(Resource, null=True, on_delete=models.CASCADE, related_name="brokenlink_resource")
class Meta:
auto_author = 'submitter'
......@@ -228,7 +228,7 @@ class BrokenLink(Model):
owner_perms = ['inherit', 'change', 'control', 'delete']
anonymous_perms = ['view']
authenticated_perms = ['inherit', 'add']
serializer_fields=["@id", "submitter", "resource_id"]
serializer_fields=["@id", "submitter", "resource"]
nested_fields=["submitter", "resource_id"]
container_path = 'brokenlinks/'
rdf_type = 'coopstarter:brokenlinks'
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