From 15a4dc21d9f38d834370d5ae00536bda10bbb111 Mon Sep 17 00:00:00 2001
From: Guillaume HEUSCH <guillaume.heusch@idiap.ch>
Date: Wed, 13 Feb 2019 15:25:06 +0100
Subject: [PATCH] [database] small fix in CASIA-SURF

---
 bob/pad/face/database/casiasurf.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bob/pad/face/database/casiasurf.py b/bob/pad/face/database/casiasurf.py
index 6590c3af..b4bad6de 100644
--- a/bob/pad/face/database/casiasurf.py
+++ b/bob/pad/face/database/casiasurf.py
@@ -144,7 +144,7 @@ class CasiaSurfPadDatabase(PadDatabase):
           The protocol for which the samples should be retrieved.
         purposes : :py:class:`str`
           The purposes for which Sample objects should be retrieved.
-          Usually it is either 'real' or 'attack', but could be 'unknown' as well
+          Usually it is either 'real' or 'attack'
         model_ids
           This parameter is not supported in PAD databases yet.
 
@@ -160,9 +160,9 @@ class CasiaSurfPadDatabase(PadDatabase):
           
           # for training
           lowlevel_purposes = []
-          if 'train' in groups and purposes == 'real':
+          if 'train' in groups and 'real' in purposes:
             lowlevel_purposes.append('real') 
-          if 'train' in groups and purposes == 'attack':
+          if 'train' in groups and 'attack' in purposes:
             lowlevel_purposes.append('attack') 
 
           # for dev and eval
-- 
GitLab