diff --git a/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m b/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m index 6bc1ac1097eeb91fd7e6539330e017628ccc00cb..8b5234ddbdd025705a2ce4f3ffbda36747c6f3e9 100644 --- a/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m +++ b/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m @@ -89,15 +89,18 @@ - (void)initializeFromRawEntity:(CISDOBIpadRawEntity *)rawEntity { + // These will always be non-nil self.permId = rawEntity.permId; self.refcon = rawEntity.refcon; - self.category = rawEntity.category; - self.summaryHeader = rawEntity.summaryHeader; - self.summary = rawEntity.summary; - self.childrenPermIdsJson = rawEntity.children; -// self.identifier = rawEntity.identifier; -// self.imageUrl = rawEntity.imageUrl; -// self.propertiesJson = rawEntity.properties; + + // Need to check if these values were transmitted with the raw entity + if (rawEntity.category) self.category = rawEntity.category; + if (rawEntity.summaryHeader) self.summaryHeader = rawEntity.summaryHeader; + if (rawEntity.summary) self.summary = rawEntity.summary; + if (rawEntity.children) self.childrenPermIdsJson = rawEntity.children; + if (rawEntity.identifier) self.identifier = rawEntity.identifier; + if (rawEntity.imageUrl) self.imageUrl = rawEntity.imageUrl; + if (rawEntity.properties) self.propertiesJson = rawEntity.properties; } @end diff --git a/openbis-ipad/BisKit/Classes/CISDOBIpadService.m b/openbis-ipad/BisKit/Classes/CISDOBIpadService.m index d368553f24a03cd5b90abc6ae00d9592db8c5e6f..30114712b1aa15faa9ad91cdf2e3eaeab7f3352a 100644 --- a/openbis-ipad/BisKit/Classes/CISDOBIpadService.m +++ b/openbis-ipad/BisKit/Classes/CISDOBIpadService.m @@ -211,7 +211,10 @@ NSString *const CISDOBIpadServiceErrorDomain = @"CISDOBIpadServiceErrorDomain"; - (NSString *)stringContentValueAtName:(NSString *)name { // Look up the index in the map - NSUInteger index = [[_fieldMap objectForKey: name] unsignedIntegerValue]; + NSNumber *indexHolder = [_fieldMap objectForKey: name]; + // This value was not provided + if (!indexHolder) return nil; + NSUInteger index = [indexHolder unsignedIntegerValue]; return [[_content objectAtIndex: index] objectForKey: @"value"]; } diff --git a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index 04cc35e431b8f53d4d4f65179f6443414d1c645d..b35f6aaf0bdaa3e036391158e68f34d4914749ac 100644 Binary files a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ