Skip to content

Commit

Permalink
Fix the 10 places with a stauts typo (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajax146 authored Feb 13, 2024
1 parent 00c4ada commit 12749c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion documentation/DevelopmentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ query = (
)
.where(self.bot.models.Applications.guild_id == str(member.guild.id))
.where(
self.bot.models.Applications.application_stauts
self.bot.models.Applications.application_status
== ApplicationStatus.PENDING.value
)
)
Expand Down
16 changes: 8 additions & 8 deletions techsupport_bot/commands/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ async def approve_application(
return

await application.update(
application_stauts=ApplicationStatus.APPROVED.value
application_status=ApplicationStatus.APPROVED.value
).apply()

await member.add_roles(
Expand Down Expand Up @@ -375,7 +375,7 @@ async def deny_application(
await interaction.response.send_message(embed=embed)
return
await application.update(
application_stauts=ApplicationStatus.DENIED.value
application_status=ApplicationStatus.DENIED.value
).apply()

await self.notify_for_application_change(
Expand Down Expand Up @@ -637,7 +637,7 @@ async def build_application_embed(
if not new:
embed.add_field(
name="Status",
value=application.application_stauts,
value=application.application_status,
inline=False,
)
embed.set_footer(text=f"User ID: {applicant.id}")
Expand All @@ -659,7 +659,7 @@ async def handle_new_application(
guild_id=str(applicant.guild.id),
applicant_name=applicant.name,
applicant_id=str(applicant.id),
application_stauts=ApplicationStatus.PENDING.value,
application_status=ApplicationStatus.PENDING.value,
background=background,
reason=reason,
)
Expand Down Expand Up @@ -834,7 +834,7 @@ async def get_applications_by_status(
list[bot.models.Applications]: The list of applications in a oldest first order
"""
query = self.bot.models.Applications.query.where(
self.bot.models.Applications.application_stauts == status.value
self.bot.models.Applications.application_status == status.value
).where(self.bot.models.Applications.guild_id == str(guild.id))
entry = await query.gino.all()
entry.sort(key=lambda entry: entry.application_time)
Expand All @@ -857,7 +857,7 @@ async def search_for_pending_application(
)
.where(self.bot.models.Applications.guild_id == str(member.guild.id))
.where(
self.bot.models.Applications.application_stauts
self.bot.models.Applications.application_status
== ApplicationStatus.PENDING.value
)
)
Expand Down Expand Up @@ -908,7 +908,7 @@ async def execute(self, config: munch.Munch, guild: discord.Guild) -> None:
" they left"
)
await app.update(
application_stauts=ApplicationStatus.REJECTED.value
application_status=ApplicationStatus.REJECTED.value
).apply()
continue

Expand All @@ -929,7 +929,7 @@ async def execute(self, config: munch.Munch, guild: discord.Guild) -> None:
f" the `{role.name}` role"
)
await app.update(
application_stauts=ApplicationStatus.APPROVED.value
application_status=ApplicationStatus.APPROVED.value
).apply()
if audit_log:
embed = discord.Embed(title="Application manage events")
Expand Down
2 changes: 1 addition & 1 deletion techsupport_bot/core/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Applications(bot.db.Model):
guild_id = bot.db.Column(bot.db.String)
applicant_name = bot.db.Column(bot.db.String)
applicant_id = bot.db.Column(bot.db.String)
application_stauts = bot.db.Column(bot.db.String)
application_status = bot.db.Column(bot.db.String)
background = bot.db.Column(bot.db.String)
reason = bot.db.Column(bot.db.String)
application_time = bot.db.Column(
Expand Down

0 comments on commit 12749c7

Please sign in to comment.