Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/asm3/animal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4911,7 +4911,6 @@ def update_animalcondition_from_form(dbo: Database, username: str, post: PostedD
Updates an animalcondition record from posted form data
"""
dbo.update("animalcondition", post.integer("animalconditionid"), {
"AnimalID": post.integer("animalid"),
"ConditionID": post.integer("conditionid"),
"StartDatetime": post.datetime("startdate", "starttime"),
"EndDatetime": post.datetime("enddate", "endtime"),
Expand Down
15 changes: 10 additions & 5 deletions src/asm3/dbupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2473,11 +2473,16 @@ def user(tid: int, username: str, realname: str, password: str, superuser: bool)
sql += breed(440, _("Llama", l), "Llama", 16)
sql += breed(441, _("Pig (Farm)", l), "Pig (Farm)", 28)
sql += breed(442, _("Mixed Breed", l), "Mixed Breed", 1)
sql += conditiontype(1, "GI")
sql += conditiontype(2, "Respiratory")
sql += conditiontype(3, "Miscellaneous")
sql += conditiontype(4, "Reproductive")
sql += conditiontype(5, "Symptom")
sql += conditiontype(1, _("GI", l))
sql += conditiontype(2, _("Respiratory", l))
sql += conditiontype(3, _("Miscellaneous", l))
sql += conditiontype(4, _("Reproductive", l))
sql += conditiontype(5, _("Symptom", l))
sql += conditiontype(6, _("Heart", l))
sql += conditiontype(7, _("Endocrine", l))
sql += conditiontype(8, _("Cancer", l))
sql += conditiontype(9, _("Oral", l))
sql += conditiontype(10, _("Bone", l))
sql += lookup2money("citationtype", "CitationName", 1, _("First offence", l))
sql += lookup2money("citationtype", "CitationName", 2, _("Second offence", l))
sql += lookup2money("citationtype", "CitationName", 3, _("Third offence", l))
Expand Down
12 changes: 6 additions & 6 deletions src/asm3/dbupdates/35108.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
fields = ",".join([
dbo.ddl_add_table_column("ID", dbo.type_integer, False, pk=True),
dbo.ddl_add_table_column("StartDatetime", dbo.type_datetime, False),
dbo.ddl_add_table_column("EndDatetime", dbo.type_integer, True),
dbo.ddl_add_table_column("EndDatetime", dbo.type_datetime, True),
dbo.ddl_add_table_column("AnimalID", dbo.type_integer, False),
dbo.ddl_add_table_column("ConditionID", dbo.type_integer, False),
dbo.ddl_add_table_column("Comments", dbo.type_longtext, False)
Expand Down Expand Up @@ -32,8 +32,8 @@
])
execute(dbo, dbo.ddl_add_table("lksconditiontype", fields) )

dbo.execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [1, _("GI"), "", 0] )
dbo.execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [2, _("Respiratory"), "", 0] )
dbo.execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [3, _("Miscellaneous"), "", 0] )
dbo.execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [4, _("Reproductive"), "", 0] )
dbo.execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [5, _("Symptom"), "", 0] )
execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [1, _("GI"), "", 0] )
execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [2, _("Respiratory"), "", 0] )
execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [3, _("Miscellaneous"), "", 0] )
execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [4, _("Reproductive"), "", 0] )
execute("INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [5, _("Symptom"), "", 0] )
7 changes: 7 additions & 0 deletions src/asm3/dbupdates/35117.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from asm3.dbupdate import execute

execute(dbo, "INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [6, _("Heart"), "", 0] )
execute(dbo, "INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [7, _("Endocrine"), "", 0] )
execute(dbo, "INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [8, _("Cancer"), "", 0] )
execute(dbo, "INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [9, _("Oral"), "", 0] )
execute(dbo, "INSERT INTO lksconditiontype (ID, ConditionTypeName, Description, IsRetired) VALUES (?, ?, ?, ?)", [10, _("Bone"), "", 0] )
4 changes: 4 additions & 0 deletions src/asm3/dbupdates/35118.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from asm3.dbupdate import execute

# Fix for incorrect column type in update 35108
execute(dbo.ddl_modify_column("animalcondition", "EndDateTime", dbo.type_datetime))