Skip to content

Commit 3293368

Browse files
Update element_session/export/nwb.py
Co-authored-by: Kabilar Gunalan <[email protected]>
1 parent f6e4ae7 commit 3293368

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

element_session/export/nwb.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@
55

66
from .. import session_with_id, session_with_datetime
77

8-
if (
9-
not session_with_id.schema.is_activated()
10-
and not session_with_datetime.schema.is_activated()
11-
):
8+
if session_with_datetime.schema.is_activated():
9+
session = session_with_datetime
10+
elif session_with_id.schema.is_activated():
11+
session = session_with_id
12+
else:
1213
raise dj.DataJointError("Session schema has not been activated.")
1314

14-
for session_module in [session_with_datetime, session_with_id]:
15-
if session_module.schema.is_activated():
16-
session = session_module
17-
else:
18-
continue
19-
2015

2116
def session_to_nwb(
2217
session_key: dict,

0 commit comments

Comments
 (0)