Commit 9fe436b8f72216361c61ecd2c1f765344fcadc42

Authored by badetitou
1 parent 7659c9ba

be sure before converting price

app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java
@@ -124,7 +124,8 @@ public class ModifyEvent extends DialogFragment { @@ -124,7 +124,8 @@ public class ModifyEvent extends DialogFragment {
124 JSONObject jsonObject = new JSONObject(); 124 JSONObject jsonObject = new JSONObject();
125 try { 125 try {
126 jsonObject.put("nomEvenement", mNom.getText().toString()); 126 jsonObject.put("nomEvenement", mNom.getText().toString());
127 - jsonObject.put("prix", Double.parseDouble(mPrice.getText().toString())); 127 + if (!mPrice.getText().toString().isEmpty())
  128 + jsonObject.put("prix", Double.parseDouble(mPrice.getText().toString()));
128 jsonObject.put("date", mDate.getSelectedItem()); 129 jsonObject.put("date", mDate.getSelectedItem());
129 } catch (JSONException e){ 130 } catch (JSONException e){
130 e.printStackTrace(); 131 e.printStackTrace();