Merge pull request #1198 from edx/ned/fix-calling-classmethods
No need to invoke classmethods through self.__class__
This commit is contained in:
@@ -91,7 +91,7 @@ class Model(object):
|
||||
pass
|
||||
|
||||
def save(self):
|
||||
self.__class__.before_save(self)
|
||||
self.before_save(self)
|
||||
if self.id: # if we have id already, treat this as an update
|
||||
url = self.url(action='put', params=self.attributes)
|
||||
response = perform_request('put', url, self.updatable_attributes())
|
||||
@@ -100,7 +100,7 @@ class Model(object):
|
||||
response = perform_request('post', url, self.initializable_attributes())
|
||||
self.retrieved = True
|
||||
self.update_attributes(**response)
|
||||
self.__class__.after_save(self)
|
||||
self.after_save(self)
|
||||
|
||||
def delete(self):
|
||||
url = self.url(action='delete', params=self.attributes)
|
||||
|
||||
Reference in New Issue
Block a user