fix: fix bug when init plan and pricing and record (#2934)

* fix: fix potential bugs in init data

* fix: improve code format

* fix: fix bug when init plan and pricing and record
This commit is contained in:
DacongDA
2024-05-07 23:33:01 +08:00
committed by GitHub
parent d24ddd4f1c
commit c302dc7b8e
3 changed files with 5 additions and 4 deletions

View File

@ -140,7 +140,7 @@ func AddPricing(pricing *Pricing) (bool, error) {
}
func DeletePricing(pricing *Pricing) (bool, error) {
affected, err := ormer.Engine.ID(core.PK{pricing.Owner, pricing.Name}).Delete(pricing)
affected, err := ormer.Engine.ID(core.PK{pricing.Owner, pricing.Name}).Delete(Pricing{})
if err != nil {
return false, err
}