diff options
author | rowanbeentje <rowan@beent.je> | 2013-03-06 00:29:45 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-03-06 00:29:45 +0000 |
commit | 9f85aaffb997a8baa41322021e4a76324a50b9a2 (patch) | |
tree | a9bf9dd3fe81af45a6877301a9df2f8a91393a13 /Source/SPCustomQuery.m | |
parent | aa7d26a28f9609963478ffdebaf6b8ffcde32bcd (diff) | |
download | sequelpro-9f85aaffb997a8baa41322021e4a76324a50b9a2.tar.gz sequelpro-9f85aaffb997a8baa41322021e4a76324a50b9a2.tar.bz2 sequelpro-9f85aaffb997a8baa41322021e4a76324a50b9a2.zip |
- If date-type fields are cleared, and allow NULLs, save the cell value as NULL; this implements Issue #1638
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r-- | Source/SPCustomQuery.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index ba3eca62..08b5838c 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1883,7 +1883,7 @@ if ( [[anObject description] isEqualToString:@"CURRENT_TIMESTAMP"] ) { newObject = @"CURRENT_TIMESTAMP"; } else if ([anObject isEqualToString:[prefs stringForKey:SPNullValue]] - || (([columnTypeGroup isEqualToString:@"float"] || [columnTypeGroup isEqualToString:@"integer"]) + || (([columnTypeGroup isEqualToString:@"float"] || [columnTypeGroup isEqualToString:@"integer"] || [columnTypeGroup isEqualToString:@"date"]) && [[anObject description] isEqualToString:@""])) { newObject = @"NULL"; |