fixed a bug that caused custom names to get lost - sorry pecha ;-;

This commit is contained in:
Lynne Megido 2020-08-24 01:00:05 +10:00
parent 0c51ba642a
commit e519907f9d
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
2 changed files with 2 additions and 2 deletions

View file

@ -65,9 +65,9 @@ class YahooAuctionsItem:
if url == None and from_json != None and id != None: if url == None and from_json != None and id != None:
self.id = id self.id = id
self.name = from_json['name'] self.name = from_json['name']
self.original_name = from_json['original_name']
if self.name == "": if self.name == "":
self.name = self.original_name self.name = self.original_name
self.original_name = from_json['original_name']
self.favourite = from_json['favourite'] self.favourite = from_json['favourite']
self.url = f"https://buyee.jp/item/yahoo/auction/{self.id}" self.url = f"https://buyee.jp/item/yahoo/auction/{self.id}"

View file

@ -38,7 +38,7 @@ class BuypeebSettings:
for key in j: for key in j:
setattr(self, key, j[key]) setattr(self, key, j[key])
for key in self.jwatchlist: for key in self.jwatchlist:
self.watchlist[key] = YahooAuctionsItem("", from_json = self.jwatchlist[key], id = key) self.watchlist[key] = YahooAuctionsItem(url = None, from_json = self.jwatchlist[key], id = key)
self.jwatchlist = {} self.jwatchlist = {}