aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-07-14 15:21:43 +0500
committerAbyss777 <abyss@fox5.ru>2016-07-14 15:21:43 +0500
commite910d9337a35fad663c978ff9121ed64ca28af91 (patch)
treeebc6c6c964f09da40e3775db759c95524eb27ad3 /src
parent82fd4d09aa7ac37bf2eb1857b12efbd3bc773a94 (diff)
downloadtrackermap-server-e910d9337a35fad663c978ff9121ed64ca28af91.tar.gz
trackermap-server-e910d9337a35fad663c978ff9121ed64ca28af91.tar.bz2
trackermap-server-e910d9337a35fad663c978ff9121ed64ca28af91.zip
- Fixed saving parent group when creating new group.
- Fixed storing device and group if parent group is not defined. - Fixed Warning in browser console about missed requirements.
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/database/QueryBuilder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 73569ac2a..477434fb5 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -175,7 +175,11 @@ public final class QueryBuilder {
public QueryBuilder setLong(String name, long value) throws SQLException {
for (int i : indexes(name)) {
try {
- statement.setLong(i, value);
+ if (value == 0) {
+ statement.setNull(i, Types.INTEGER);
+ } else {
+ statement.setLong(i, value);
+ }
} catch (SQLException error) {
statement.close();
connection.close();