diff --git a/openphoto/api_album.py b/openphoto/api_album.py index f2f2644..9777a30 100644 --- a/openphoto/api_album.py +++ b/openphoto/api_album.py @@ -43,10 +43,7 @@ class ApiAlbum: if not isinstance(album, Album): album = Album(self._client, {"id": album}) album.update(**kwds) - - # Don't return the album, since the API currently doesn't give us the modified album - # TODO: Uncomment the following once frontend issue #937 is resolved -# return album + return album def view(self, album, **kwds): """ diff --git a/openphoto/objects.py b/openphoto/objects.py index 1d09f43..42803df 100644 --- a/openphoto/objects.py +++ b/openphoto/objects.py @@ -162,14 +162,8 @@ class Album(OpenPhotoObject): """ Update this album with the specified parameters """ new_dict = self._openphoto.post("/album/%s/update.json" % self.id, **kwds)["result"] - - # Since the API doesn't give us the modified album, we need to - # update our fields based on the kwds that were sent - self._set_fields(kwds) - - # Replace the above line with the below once frontend issue #937 is resolved -# self._set_fields(new_dict) -# self._update_fields_with_objects() + self._replace_fields(new_dict) + self._update_fields_with_objects() def view(self, **kwds): """ diff --git a/tests/test_base.py b/tests/test_base.py index ad425b1..1365c88 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -69,7 +69,7 @@ class TestBase(unittest.TestCase): self.photos = self.client.photos.list() if len(self.photos) != 3: # print self.photos - print "[Regenerating Photos]" + print "\n[Regenerating Photos]" if len(self.photos) > 0: self._delete_all() self._create_test_photos() @@ -79,7 +79,7 @@ class TestBase(unittest.TestCase): if (len(self.tags) != 1 or self.tags[0].id != self.TEST_TAG or self.tags[0].count != 3): - print "[Regenerating Tags]" + print "\n[Regenerating Tags]" self._delete_all() self._create_test_photos() self.photos = self.client.photos.list() @@ -92,7 +92,7 @@ class TestBase(unittest.TestCase): if (len(self.albums) != 1 or self.albums[0].name != self.TEST_ALBUM or self.albums[0].count != "3"): - print "[Regenerating Albums]" + print "\n[Regenerating Albums]" self._delete_all() self._create_test_photos() self.photos = self.client.photos.list()