Skip to content
Browse files

minor fix for api when an env doesn't belong to a profile.

  • Loading branch information...
1 parent 562c0cf commit 9a0ebedb92963778bc7f83c8aca4149f4102fb6c @camd camd committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 moztrap/model/environments/
3 moztrap/model/environments/
@@ -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()

0 comments on commit 9a0ebed

Please sign in to comment.
Something went wrong with that request. Please try again.