fix: fixed package_release
This commit is contained in:
parent
dadd7abad2
commit
d7f25ecb24
1 changed files with 3 additions and 2 deletions
|
|
@ -23,9 +23,10 @@ class PackageRelease(Document):
|
|||
.where(doctype.package == self.package) \
|
||||
.select(Max("minor")).run()[0][0] or 0
|
||||
if not self.patch:
|
||||
self.patch = frappe.qb.from_(doctype) \
|
||||
value = frappe.qb.from_(doctype) \
|
||||
.where(doctype.package == self.package) \
|
||||
.select(Max("patch")).run()[0][0] or 1
|
||||
.select(Max("patch")).run()[0][0] or 0
|
||||
self.patch = value + 1
|
||||
|
||||
def autoname(self):
|
||||
self.set_version()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue