Fix types
This commit is contained in:
parent
6f6116c3c7
commit
c092d3089f
13 changed files with 48 additions and 18 deletions
|
|
@ -289,7 +289,7 @@ class KickDropCampaign(auto_prefetch.Model):
|
|||
"""Return the image URL for the campaign."""
|
||||
# Image from first drop
|
||||
if self.rewards.exists(): # pyright: ignore[reportAttributeAccessIssue]
|
||||
first_reward: KickReward = self.rewards.first() # pyright: ignore[reportAttributeAccessIssue]
|
||||
first_reward: KickReward | None = self.rewards.first() # pyright: ignore[reportAttributeAccessIssue]
|
||||
if first_reward and first_reward.image_url:
|
||||
return first_reward.full_image_url
|
||||
|
||||
|
|
|
|||
|
|
@ -442,6 +442,8 @@ class ImportKickDropsCommandTest(TestCase):
|
|||
campaign: KickDropCampaign = KickDropCampaign.objects.get()
|
||||
assert campaign.name == "PUBG 9th Anniversary"
|
||||
assert campaign.status == "active"
|
||||
assert campaign.organization is not None
|
||||
assert campaign.category is not None
|
||||
assert campaign.organization.name == "KRAFTON"
|
||||
assert campaign.category.name == "PUBG: Battlegrounds"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue