Improve the can_user_add model hook to allow it to pre-examine data for context.

This commit is contained in:
Michael DeHaan
2013-03-25 19:00:07 -04:00
parent be1bd56ca2
commit dbfd764acd
5 changed files with 33 additions and 11 deletions

View File

@@ -87,7 +87,7 @@ class InventorySerializer(BaseSerializer):
class Meta:
model = Inventory
fields = ('url', 'id', 'name', 'description', 'creation_date')
fields = ('url', 'id', 'name', 'description', 'creation_date', 'organization')
def get_related(self, obj):
# FIXME: add related resources: inventories