File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -298,12 +298,10 @@ def exists(self):
298
298
"""
299
299
if self .database is None :
300
300
raise DataJointError ("Schema must be activated first." )
301
- return self .database is not None and (
302
- self .connection .query (
303
- "SELECT schema_name "
304
- "FROM information_schema.schemata "
305
- "WHERE schema_name = '{database}'" .format (
306
- database = self .database )).rowcount > 0 )
301
+ return bool (self .connection .query (
302
+ "SELECT schema_name "
303
+ "FROM information_schema.schemata "
304
+ "WHERE schema_name = '{database}'" .format (database = self .database )).rowcount )
307
305
308
306
@property
309
307
def jobs (self ):
Original file line number Diff line number Diff line change @@ -241,5 +241,9 @@ def test_fetch_format(self):
241
241
list1 = sorted (key , key = itemgetter ('subject_id' ))
242
242
for l1 , l2 in zip (list1 , list2 ):
243
243
assert_dict_equal (l1 , l2 , 'Primary key is not returned correctly' )
244
+
245
+ # test pandas with fetch1
246
+ k = (self .subject & 'subject_id=10' ).fetch1 ('KEY' )
247
+
244
248
# revert configuration of fetch format
245
249
dj .config ['fetch_format' ] = 'array'
You can’t perform that action at this time.
0 commit comments