@@ -536,8 +536,6 @@ def create(self, entity_type, data, return_fields=None):
536536 :returns: dict of the requested fields.
537537 """
538538
539- data = copy .deepcopy (data )
540-
541539 if not return_fields :
542540 return_fields = ["id" ]
543541
@@ -552,19 +550,10 @@ def create(self, entity_type, data, return_fields=None):
552550 "higher, server is %s" % (self .server_caps .version ,))
553551 upload_filmstrip_image = data .pop ('filmstrip_image' )
554552
555- temp_return_fields = copy .deepcopy (return_fields )
556- if upload_image and "image" in temp_return_fields :
557- temp_return_fields .remove ("image" )
558- # end if
559-
560- if upload_filmstrip_image and "filmstrip_image" in temp_return_fields :
561- temp_return_fields .remove ("filmstrip_image" )
562- # end if
563-
564553 params = {
565554 "type" : entity_type ,
566555 "fields" : self ._dict_to_list (data ),
567- "return_fields" : temp_return_fields
556+ "return_fields" : return_fields
568557 }
569558
570559 record = self ._call_rpc ("create" , params , first = True )
@@ -606,8 +595,6 @@ def update(self, entity_type, entity_id, data):
606595 id added.
607596 """
608597
609- data = copy .deepcopy (data )
610-
611598 upload_image = None
612599 if 'image' in data and data ['image' ] is not None :
613600 upload_image = data .pop ('image' )
@@ -625,7 +612,6 @@ def update(self, entity_type, entity_id, data):
625612 "id" : entity_id ,
626613 "fields" : self ._dict_to_list (data )
627614 }
628-
629615 record = self ._call_rpc ("update" , params )
630616 result = self ._parse_records (record )[0 ]
631617 else :
0 commit comments