diff --git a/src/sfapi_client/_async/client.py b/src/sfapi_client/_async/client.py index 1278f97..81e2d51 100644 --- a/src/sfapi_client/_async/client.py +++ b/src/sfapi_client/_async/client.py @@ -512,3 +512,9 @@ def resources(self) -> AsyncResources: AsyncRemotePath.model_rebuild() AsyncRole.model_rebuild() AsyncGroupMember.model_rebuild() + +# Ensure that the job models are built, we need to import here to +# avoid circular imports +from .jobs import AsyncJobSacct, AsyncJobSqueue +AsyncJobSqueue.model_rebuild() +AsyncJobSacct.model_rebuild() \ No newline at end of file diff --git a/src/sfapi_client/_sync/client.py b/src/sfapi_client/_sync/client.py index ee4b92c..cc6aae1 100644 --- a/src/sfapi_client/_sync/client.py +++ b/src/sfapi_client/_sync/client.py @@ -512,3 +512,9 @@ def resources(self) -> Resources: RemotePath.model_rebuild() Role.model_rebuild() GroupMember.model_rebuild() + +# Ensure that the job models are built, we need to import here to +# avoid circular imports +from .jobs import JobSacct, JobSqueue +JobSqueue.model_rebuild() +JobSacct.model_rebuild() \ No newline at end of file