mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable'
This commit is contained in:
		
						commit
						2feb778d8d
					
				| @ -104,13 +104,17 @@ class AbstractEntity { | |||||||
|         const entityId = this[this.constructor.primaryKeyName]; |         const entityId = this[this.constructor.primaryKeyName]; | ||||||
|         const entityName = this.constructor.entityName; |         const entityName = this.constructor.entityName; | ||||||
| 
 | 
 | ||||||
|  |         this.utcDateModified = dateUtils.utcNowDateTime(); | ||||||
|  | 
 | ||||||
|         sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
 |         sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
 | ||||||
|                            WHERE ${this.constructor.primaryKeyName} = ?`,
 |                            WHERE ${this.constructor.primaryKeyName} = ?`,
 | ||||||
|             [deleteId, dateUtils.utcNowDateTime(), entityId]); |             [deleteId, this.utcDateModified, entityId]); | ||||||
| 
 | 
 | ||||||
|         if (this.dateModified) { |         if (this.dateModified) { | ||||||
|  |             this.dateModified = dateUtils.localNowDateTime(); | ||||||
|  | 
 | ||||||
|             sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`, |             sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`, | ||||||
|                 [dateUtils.localNowDateTime(), entityId]); |                 [this.dateModified, entityId]); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         log.info(`Marking ${entityName} ${entityId} as deleted`); |         log.info(`Marking ${entityName} ${entityId} as deleted`); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam