refactor(documents): rename document tree model
This commit is contained in:
@@ -269,7 +269,7 @@ func utcOptionalTime(value *time.Time) *time.Time {
|
||||
|
||||
func ensureSharedObjectInProject(tx *gorm.DB, projectID uint, objectID uint) error {
|
||||
var count int64
|
||||
if err := tx.Model(&models.SaDocument{}).Where("id = ? AND project_id = ?", objectID, projectID).Count(&count).Error; err != nil {
|
||||
if err := tx.Model(&models.SaDocumentTree{}).Where("id = ? AND project_id = ?", objectID, projectID).Count(&count).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if count == 0 {
|
||||
|
||||
Reference in New Issue
Block a user