Skip to content

Commit

Permalink
Merge pull request #101 from Thorfusion/dev
Browse files Browse the repository at this point in the history
fix missing row in result for optional/server builds
  • Loading branch information
maggi373 authored Dec 22, 2024
2 parents 9abdae8 + 5797ba7 commit ddab14a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ def get_modversions_api(self, tag: str):
cursor = conn.cursor(dictionary=True)
if tag == "optional":
cursor.execute(
"""SELECT modversions.id, modversions.mod_id, modversions.version, modversions.mcversion, modversions.md5, modversions.created_at, modversions.updated_at, modversions.filesize, mods.name AS modname, mods.pretty_name, mods.author, mods.link, build_modversion.optional
"""SELECT modversions.id, modversions.mod_id, modversions.version, modversions.mcversion, modversions.md5, modversions.created_at, modversions.updated_at, modversions.filesize, mods.name AS modname, mods.pretty_name, mods.author, mods.link, mods.description, build_modversion.optional
FROM modversions
INNER JOIN build_modversion ON modversions.id = build_modversion.modversion_id JOIN mods ON modversions.mod_id = mods.id
WHERE build_modversion.build_id = %s AND mods.side IN ('CLIENT','BOTH')
""", (self.id,))
elif tag == "server":
cursor.execute(
"""SELECT modversions.id, modversions.mod_id, modversions.version, modversions.mcversion, modversions.md5, modversions.created_at, modversions.updated_at, modversions.filesize, mods.name AS modname, mods.pretty_name, mods.author, mods.link, build_modversion.optional
"""SELECT modversions.id, modversions.mod_id, modversions.version, modversions.mcversion, modversions.md5, modversions.created_at, modversions.updated_at, modversions.filesize, mods.name AS modname, mods.pretty_name, mods.author, mods.link, mods.description, build_modversion.optional
FROM modversions
INNER JOIN build_modversion ON modversions.id = build_modversion.modversion_id JOIN mods ON modversions.mod_id = mods.id
WHERE build_modversion.build_id = %s AND build_modversion.optional = 0 AND mods.side IN ('SERVER','BOTH')
Expand Down

0 comments on commit ddab14a

Please sign in to comment.