{
result = badRequest(form.errorsAsJson());
}
else
{
FeaturedModule incoming = form.get();
FeaturedModule storedVersion = FeaturedModule.FIND.byId(incoming.id);
storedVersion.description = StringUtils.isEmpty(incoming.description) ? storedVersion.playModule.description
: incoming.description;
storedVersion.sticky = incoming.sticky;
storedVersion.save();
// Annoying - converting storedVersion directly to JSON results in a cycle according to Jackson
// Buggered if I can see why though
ObjectNode node = Json.newObject();
node.put("id", storedVersion.id);