diff --git a/backend/api/views/upload/readers.py b/backend/api/views/upload/readers.py index d5cea5b7..058f37ec 100644 --- a/backend/api/views/upload/readers.py +++ b/backend/api/views/upload/readers.py @@ -21,6 +21,19 @@ class Record: def __str__(self): return f'{self._data}\t{self._label}' + @property + def data(self): + return self._data.dict() + + @property + def label(self): + return [ + { + 'text': label.name + } for label in self._label + if label.has_name() and label.name + ] + class BaseReader(collections.abc.Iterable):