Skip to content

Commit

Permalink
Representation option after create or update object using rest API. R…
Browse files Browse the repository at this point in the history
…ESTWS-669 (openmrs#289)
  • Loading branch information
jaks80 authored and dkayiwa committed Jul 16, 2017
1 parent 41d46ef commit 12efaa5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Object create(SimpleObject propertiesToCreate, RequestContext context) th
T delegate = convert(propertiesToCreate);
ValidateUtil.validate(delegate);
delegate = save(delegate);
SimpleObject ret = (SimpleObject) ConversionUtil.convertToRepresentation(delegate, Representation.DEFAULT);
SimpleObject ret = (SimpleObject) ConversionUtil.convertToRepresentation(delegate, context.getRepresentation());

// add the 'type' discriminator if we support subclasses
if (hasTypesDefined()) {
Expand Down Expand Up @@ -141,7 +141,7 @@ public Object update(String uuid, SimpleObject propertiesToUpdate, RequestContex
ValidateUtil.validate(delegate);
delegate = save(delegate);

SimpleObject ret = (SimpleObject) ConversionUtil.convertToRepresentation(delegate, Representation.DEFAULT);
SimpleObject ret = (SimpleObject) ConversionUtil.convertToRepresentation(delegate, context.getRepresentation());

// add the 'type' discriminator if we support subclasses
if (hasTypesDefined()) {
Expand Down

0 comments on commit 12efaa5

Please sign in to comment.