File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -454,10 +454,11 @@ - (void)removeExpiredBannedBooks
454454 NSMutableArray *booksToRemove = [[NSMutableArray alloc ] init ];
455455 for (NSString *bookIdentifer in self.identifiersToRecords ) {
456456 NYPLBookRegistryRecord *record = self.identifiersToRecords [bookIdentifer];
457+ NYPLOPDSAcquisition *acquisition = record.book .defaultAcquisition ;
457458 // Add the book to remove list if it is distributed by Axis360 and expired
458- if ([record.book.defaultAcquisition.type isEqualToString: ContentTypeAxis360]) {
459- if (record. book . defaultAcquisition . availability . until &&
460- [record.book.defaultAcquisition. availability.until compare: [NSDate date ]] == NSOrderedAscending ) {
459+ // or with no expiration
460+ if ([acquisition.type isEqualToString: ContentTypeAxis360]) {
461+ if ([acquisition. availability.until compare: [NSDate date ]] != NSOrderedDescending ) {
461462 [booksToRemove addObject: bookIdentifer];
462463 }
463464 }
You can’t perform that action at this time.
0 commit comments