Commit 07dbede4 by Tuukka Kivilahti

asdf

1 parent 9aaaffd3
...@@ -55,6 +55,8 @@ public class GenericEntity extends EntityEquals implements ModelInterface, Entit ...@@ -55,6 +55,8 @@ public class GenericEntity extends EntityEquals implements ModelInterface, Entit
@Override @Override
public JsonObject getMeta() { public JsonObject getMeta() {
// TODO: do not return null, it's not logical
// empty jsonobject would be moar logical (maybe?)
return meta; return meta;
} }
......
...@@ -273,21 +273,20 @@ public class IncomingView extends GenericCDIView { ...@@ -273,21 +273,20 @@ public class IncomingView extends GenericCDIView {
*/ */
public String getCardFiling() { public String getCardFiling() {
String ret = ""; String ret = "";
// try {
PrintedCard card = cardBean.checkPrintedCard(userview.getSelectedUser()); PrintedCard card = cardBean.checkPrintedCard(userview.getSelectedUser());
if (card != null) { if (card != null) {
JsonObject cardMeta = card.getMeta(); JsonObject cardMeta = card.getMeta();
JsonObject cardFilingObject = cardMeta.getJsonObject("card-filing");
if(cardFilingObject != null) { if(cardMeta != null) {
ret = cardFilingObject.getString("cardplace"); JsonObject cardFilingObject = cardMeta.getJsonObject("card-filing");
if (cardFilingObject != null) {
ret = cardFilingObject.getString("cardplace");
}
} }
} }
// Hmm, onkohan tää ihan tarkoituksenmukaista?
// (mergerequestin tekijä vois arvioida)
// } catch (Exception e) {
// logger.warn("Could not get card filing info", e);
// }
return ret; return ret;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!