refs #2311: Old fallback records are not recovered

https://support.d4science.org/issues/2311

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@124317 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-02-18 17:10:33 +00:00
parent be1850d35c
commit a30b04e2f9
1 changed files with 12 additions and 0 deletions

View File

@ -180,6 +180,18 @@ public class RecordUtility {
public static Record getRecord(Map<String, ? extends Serializable> recordMap) throws Exception {
String className = (String) recordMap.get(Record.RECORD_TYPE);
/*
* Patch to support accounting records accounted on fallback
* with usageRecordType instead recordType property.
*
* TODO Remove when all old fallback files has been elaborated
*/
if(className == null){
className = (String) recordMap.get("usageRecordType");
}
/* END of Patch */
boolean aggregated = false;
try {
aggregated = (Boolean) recordMap.get(AggregatedRecord.AGGREGATED);