Commit 9fe436b8f72216361c61ecd2c1f765344fcadc42
1 parent
7659c9ba
be sure before converting price
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java
... | ... | @@ -124,7 +124,8 @@ public class ModifyEvent extends DialogFragment { |
124 | 124 | JSONObject jsonObject = new JSONObject(); |
125 | 125 | try { |
126 | 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 | 129 | jsonObject.put("date", mDate.getSelectedItem()); |
129 | 130 | } catch (JSONException e){ |
130 | 131 | e.printStackTrace(); | ... | ... |