Skip to content
Snippets Groups Projects
Commit f84e033c authored by Henrik Thostrup Jensen's avatar Henrik Thostrup Jensen
Browse files

add support for empty start time in database service connections (aggregator)...

add support for empty start time in database service connections (aggregator) and core schedule representation (third patch)
parent 8cd8aac3
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ CREATE TABLE service_connections ( ...@@ -39,7 +39,7 @@ CREATE TABLE service_connections (
dest_network text NOT NULL, dest_network text NOT NULL,
dest_port text NOT NULL, dest_port text NOT NULL,
dest_label label, dest_label label,
start_time timestamp NOT NULL, start_time timestamp, -- null = now
end_time timestamp NOT NULL, end_time timestamp NOT NULL,
symmetrical boolean NOT NULL, symmetrical boolean NOT NULL,
directionality directionality NOT NULL, directionality directionality NOT NULL,
......
...@@ -375,7 +375,8 @@ class Schedule(object): ...@@ -375,7 +375,8 @@ class Schedule(object):
def __init__(self, start_time, end_time): def __init__(self, start_time, end_time):
# Must be datetime instances without tzinfo # Must be datetime instances without tzinfo
assert start_time.tzinfo is None, 'Start time must NOT have time zone' if start_time is not None:
assert start_time.tzinfo is None, 'Start time must NOT have time zone'
assert end_time.tzinfo is None, 'End time must NOT have time zone' assert end_time.tzinfo is None, 'End time must NOT have time zone'
self.start_time = start_time self.start_time = start_time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment