Skip to content

Commit 66ddb8c

Browse files
committed
FIX PUT BUG!
1 parent 1806be3 commit 66ddb8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: YTKKeyValueStore/YTKKeyValueStore/YTKTable.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public struct YTKTable{
8181

8282
if let filter = self.query?.filter(ID == set.objectId).limit(1){
8383
if filter.isEmpty{
84-
return self.query!.insert(ID <- set.objectId , JSON <- jsonString! , CREATEDTIME <- NSDate())
84+
return filter.insert(ID <- set.objectId , JSON <- jsonString! , CREATEDTIME <- NSDate())
8585
}else{
86-
return self.query!.update(JSON <- jsonString! , CREATEDTIME <- NSDate() )
86+
return filter.update(JSON <- jsonString! , CREATEDTIME <- NSDate() )
8787
}
8888
}
8989
return nil
@@ -130,4 +130,4 @@ public struct YTKTable{
130130
}
131131

132132

133-
}
133+
}

0 commit comments

Comments
 (0)