diff options
Diffstat (limited to 'models')
-rwxr-xr-x | models/db/engine.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/db/engine.go b/models/db/engine.go index 2a2743e927..6b0ad7744b 100755 --- a/models/db/engine.go +++ b/models/db/engine.go @@ -284,8 +284,8 @@ func MaxBatchInsertSize(bean any) int { } // IsTableNotEmpty returns true if table has at least one record -func IsTableNotEmpty(tableName string) (bool, error) { - return x.Table(tableName).Exist() +func IsTableNotEmpty(beanOrTableName any) (bool, error) { + return x.Table(beanOrTableName).Exist() } // DeleteAllRecords will delete all the records of this table |