findNoteOrCreate: Create new note with empty string instead of null
				
					
				
			Backport of #345 to 1.x Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
This commit is contained in:
		
							parent
							
								
									68174c0c6f
								
							
						
					
					
						commit
						4c0094a1f8
					
				@ -19,7 +19,7 @@ exports.findNote = function (req, res, callback, include) {
 | 
				
			|||||||
      include: include || null
 | 
					      include: include || null
 | 
				
			||||||
    }).then(function (note) {
 | 
					    }).then(function (note) {
 | 
				
			||||||
      if (!note) {
 | 
					      if (!note) {
 | 
				
			||||||
        return exports.newNote(req, res, null)
 | 
					        return exports.newNote(req, res, '')
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (!exports.checkViewPermission(req, note)) {
 | 
					      if (!exports.checkViewPermission(req, note)) {
 | 
				
			||||||
        return errors.errorForbidden(res)
 | 
					        return errors.errorForbidden(res)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user