1. indifex
  2. transifex

Commits

Apostolis Bessas  committed 72934c9

Return the slug of the project for a release, too.

  • Participants
  • Parent commits 76170b7
  • Branches default

Comments (0)

Files changed (1)

File transifex/releases/api.py

View file
 
     allowed_methods = ('GET',)
     model = Release
-    fields = ('slug', 'name', 'release_date', ('resources', ('slug', 'name',)))
+    fields = ('slug', 'name', 'project_slug', 'release_date', ('resources', ('slug', 'name',)))
     exclude = ()
 
+    @classmethod
+    def project_slug(cls, r):
+        return r.project.slug
+
     def read(self, request, project_slug, release_slug=None, api_version=1):
         """
         Get details of a release.