File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -364,14 +364,17 @@ def update_data(self, sparse_update_data):
364364 new_data = sparse_update_data
365365 self .set_data (new_data )
366366
367- def set_data (self , data ):
367+ def set_data (self , data , copy_data : bool = True ):
368368 """
369369 Set the current in memory data. The data will be checked for validity
370370 before in memory values are set. Invalid data will result in an exception
371371 being thrown and no change being made to the in memory object.
372372 """
373373 self .check_data (data )
374- self ._data = data .copy ()
374+ if copy_data :
375+ self ._data = data .copy ()
376+ else :
377+ self ._data = data
375378 self ._load_time = int (time .time ())
376379
377380 def check_data (self , data ):
@@ -459,9 +462,7 @@ def load(self):
459462 return # we now allow in memory operation. Should we raise an error if the current data is invalid?
460463
461464 new_data = self ._object_storage_provider .load_obj (self ._file_path )
462- self .check_data (new_data )
463- self ._data = new_data
464- self ._load_time = int (time .time ())
465+ self .set_data (new_data , copy_data = False )
465466
466467 def lazy_load (self ):
467468 """
You can’t perform that action at this time.
0 commit comments