File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change
1
+ import sys
1
2
import os
2
3
import requests
3
4
from uuid import UUID
@@ -118,6 +119,9 @@ def hydrate(self) -> None:
118
119
self .__people = self .__marshal (self ._records ("people" ), AttioPerson ) # type: ignore
119
120
self .__users = self .__marshal (self ._records ("users" ), AttioUser ) # type: ignore
120
121
self .__connect ()
122
+ if len (self .__workspaces ) == 0 or len (self .__people ) == 0 or len (self .__users ) == 0 :
123
+ log .fatal ("No data found in Attio" )
124
+ sys .exit (3 )
121
125
self .hydrated = True
122
126
123
127
def __connect (self ) -> None :
Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ def hydrate(self) -> None:
82
82
self .close ()
83
83
log .debug (f"Found { len (self .__workspaces )} workspaces in database" )
84
84
log .debug (f"Found { len (self .__users )} users in database" )
85
+ if len (self .__users ) == 0 or len (self .__workspaces ) == 0 :
86
+ log .fatal ("No data found in Fix database" )
87
+ sys .exit (2 )
85
88
self .hydrated = True
86
89
87
90
def close (self ) -> None :
You can’t perform that action at this time.
0 commit comments