Browse Source

besserer fototest

hmt 8 years ago
parent
commit
2f4ae7c6e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/schild.rb

+ 1 - 1
lib/schild.rb

@@ -328,7 +328,7 @@ module SchildErweitert
 
     # fragt ab, ob in Schild ein Foto als hinterlegt eingetragen ist.
     def foto_vorhanden?
-      (self.foto_vorhanden == "+") && (self.schuelerfoto.foto)
+      !!(self.schuelerfoto && self.schuelerfoto.foto)
     end
 
     # gibt, wenn vorhanden, ein Foto als jpg-String zurück, ansonsten nil.