Implement nuking ads

This commit is contained in:
2023-03-10 15:27:30 +00:00
parent bf65d028f1
commit 7f088d15c2
4 changed files with 35 additions and 7 deletions

View File

@@ -667,14 +667,17 @@ class LocalPlatformClient(ABC):
account_info,
) = self.get_valid_account_details(ad)
# Let's get rid of the ad IDs and make it a tuple like dist_list
our_ads = [(x[0], x[2], x[3], x[4]) for x in our_ads]
if not our_ads:
log.error("Could not get our ads.")
if our_ads in [None, False]:
log.error("Could not get our ads")
return False
our_ads = [(x[0], x[2], x[3], x[4]) for x in our_ads]
to_return = []
for asset, countrycode, currency, provider in dist_list:
if (asset, countrycode, currency, provider) not in our_ads:
if currency in supported_currencies:
if currency not in account_info:
continue
# Create the actual ad and pass in all the stuff
rtrn = await self.create_ad(
asset,