We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6e4ae7 commit 3293368Copy full SHA for 3293368
element_session/export/nwb.py
@@ -5,18 +5,13 @@
5
6
from .. import session_with_id, session_with_datetime
7
8
-if (
9
- not session_with_id.schema.is_activated()
10
- and not session_with_datetime.schema.is_activated()
11
-):
+if session_with_datetime.schema.is_activated():
+ session = session_with_datetime
+elif session_with_id.schema.is_activated():
+ session = session_with_id
12
+else:
13
raise dj.DataJointError("Session schema has not been activated.")
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
-
20
21
def session_to_nwb(
22
session_key: dict,
0 commit comments