From 8c48542aed7a7e22cb1354f913b6ba90e97bda20 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 14 Apr 2009 01:30:00 +0000 Subject: - When adding a new row, insert the pref-set value for NULL if the default value is NULL (fixes Issue #229) --- Source/TableContent.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index 2a359d07..e28cf44e 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -692,7 +692,7 @@ columns = [[NSArray alloc] initWithArray:[tableDataInstance columns]]; for ( i = 0 ; i < [columns count] ; i++ ) { column = [columns objectAtIndex:i]; - if ([column objectForKey:@"default"] == nil) { + if ([column objectForKey:@"default"] == nil || [[column objectForKey:@"default"] isEqualToString:@"NULL"]) { [newRow setObject:[prefs stringForKey:@"NullValue"] forKey:[column objectForKey:@"name"]]; } else { [newRow setObject:[column objectForKey:@"default"] forKey:[column objectForKey:@"name"]]; -- cgit v1.2.3