From 5df08058e5dff7362aa1a10b9912f87e2947ec43 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 13 Nov 2013 09:51:09 -0500 Subject: [PATCH] include legacy fields in Resolve output for backwards compatibility --- sfa/storage/model.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sfa/storage/model.py b/sfa/storage/model.py index 16338095..929ab85a 100644 --- a/sfa/storage/model.py +++ b/sfa/storage/model.py @@ -391,5 +391,14 @@ def augment_with_sfa_builtins (local_record): related_records = getattr(local_record,attribute,[]) hrns = [ r.hrn for r in related_records ] setattr (local_record, field_name, hrns) + + # include legacy 'slices' and 'keys' fields for backwards compatibility + reg_keys = getattr(local_record, 'reg-keys') + if reg_keys: + setattr(local_record, 'keys', reg_keys) + reg_slices = getattr(local_record, 'reg-slices') + if reg_slices: + setattr(local_record, 'slices', reg_slices) + -- 2.43.0