Skip to content

Commit

Permalink
refactor(DonationsImporter): fix variable names
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Ly <contact@edward.ly>
  • Loading branch information
edward-ly committed Sep 19, 2024
1 parent 39969cc commit 94c75c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nextcloudappstore/api/v1/release/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ def create_screenshot(img: dict[str, str]) -> Screenshot:

class DonationsImporter(ScalarImporter):
def import_data(self, key: str, value: Any, obj: Any) -> None:
def create_donation(img: dict[str, str]) -> Donation:
def create_donation(dnt: dict[str, str]) -> Donation:
return Donation.objects.create(
url=img["url"],
url=dnt["url"],
app=obj,
ordering=img["ordering"],
title=img["title"],
type=img["type"],
ordering=dnt["ordering"],
title=dnt["title"],
type=dnt["type"],
)

shots = map(lambda val: create_donation(val["donation"]), value)
obj.donations.set(list(shots))
donations = map(lambda val: create_donation(val["donation"]), value)
obj.donations.set(list(donations))


class CategoryImporter(ScalarImporter):
Expand Down

0 comments on commit 94c75c0

Please sign in to comment.