Commit db1fb793 authored by Marcel Nellesen's avatar Marcel Nellesen

Fixed the failing tests

parent 84c7fabd
......@@ -24,7 +24,7 @@ namespace Coscine.Api.Project.Models
}
Resource resource = new Resource()
{
{
DisplayName = resourceObject.DisplayName,
ResourceName = resourceObject.ResourceName,
Description = resourceObject.Description,
......@@ -33,7 +33,8 @@ namespace Coscine.Api.Project.Models
TypeId = resourceObject.Type.Id,
Type = new ResourceTypeModel().GetById(resourceObject.Type.Id),
VisibilityId = resourceObject.Visibility.Id,
ApplicationProfile = resourceObject.ApplicationProfile,
FixedValues = resourceObject.FixedValues != null ? resourceObject.FixedValues.ToString() :"{}"
};
if(resourceObject.License != null)
{
......@@ -276,7 +277,7 @@ namespace Coscine.Api.Project.Models
(resource.License != null) ? new LicenseObject(resource.License.Id, resource.License.DisplayName) : null,
JObject.FromObject(resourceTypeOptionObject),
resource.ApplicationProfile,
JToken.Parse(resource.FixedValues)
JToken.Parse(resource.FixedValues == null ? "{}": resource.FixedValues )
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment