Commits

Jesper Nøhr  committed 1496336

but don't ignore get_api_url on the model. testcases now pass.

  • Participants
  • Parent commits 5dd2366

Comments (0)

Files changed (1)

File piston/emitters.py

                     url_id, fields = handler.resource_uri()
                     ret['resource_uri'] = permalink( lambda: (url_id, 
                         (getattr(data, f) for f in fields) ) )()
-            elif hasattr(data, 'get_api_url'):
+            
+            if hasattr(data, 'get_api_url') and 'resource_uri' not in ret:
                 try: ret['resource_uri'] = data.get_api_url()
                 except: pass