Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
minor fix for api when an env doesn't belong to a profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Dawson committed Mar 29, 2013
1 parent 562c0cf commit 9a0ebed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion moztrap/model/environments/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class EnvironmentResource(MTResource):
"""Create, Read and Delete capabilities for environments"""

elements = fields.ToManyField(ElementResource, "elements")
profile = fields.ForeignKey(ProfileResource, "profile")
# an environment is not required to be associated with a profile
profile = fields.ForeignKey(ProfileResource, "profile", null=True)

class Meta(MTResource.Meta):
queryset = Environment.objects.all()
Expand Down

0 comments on commit 9a0ebed

Please sign in to comment.