Skip to content

Commit 65d0bf0

Browse files
committed
Add lastModified attribute to DSpaceObject
* Add check for lastModified attribute in DSpaceObject.__init__ method to pass the attribute to child classes
1 parent f4de808 commit 65d0bf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dspace_rest_client/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def __init__(self, api_resource=None, dso=None):
132132
self.handle = api_resource['handle']
133133
if 'metadata' in api_resource:
134134
self.metadata = api_resource['metadata'].copy()
135+
if 'lastModified' in api_resource:
136+
self.lastModified = api_resource['lastModified']
135137
# Python interprets _ prefix as private so for now, renaming this and handling it separately
136138
# alternatively - each item could implement getters, or a public method to return links
137139
if '_links' in api_resource:

0 commit comments

Comments
 (0)