diff --git a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx
index a73a6b4025..dedd7bc7c7 100644
--- a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx
+++ b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.test.jsx
@@ -156,7 +156,7 @@ describe('', () => {
});
});
wrapper.update();
- act(() => {
+ await act(async () => {
wrapper.find('Button[variant="primary"]').invoke('onClick')();
});
expect(onChange).toBeCalledWith([
@@ -201,7 +201,7 @@ describe('', () => {
});
});
wrapper.update();
- act(() => {
+ await act(async () => {
wrapper.find('Button[variant="primary"]').invoke('onClick')();
});
expect(onChange).toBeCalledWith([
@@ -248,7 +248,7 @@ describe('', () => {
});
});
wrapper.update();
- act(() => {
+ await act(async () => {
wrapper.find('Button[variant="primary"]').invoke('onClick')();
});
expect(onChange).toBeCalledWith([
@@ -301,7 +301,7 @@ describe('', () => {
});
});
wrapper.update();
- act(() => {
+ await act(async () => {
wrapper.find('Button[variant="primary"]').invoke('onClick')();
});
expect(onChange).toBeCalledWith([
diff --git a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx
index d67fa3473c..78fd6e28f9 100644
--- a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx
+++ b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx
@@ -14,6 +14,9 @@ function PlaybookSelect({ projectId, isValid, field, onBlur, onError, i18n }) {
error,
} = useRequest(
useCallback(async () => {
+ if (!projectId) {
+ return [];
+ }
const { data } = await ProjectsAPI.readPlaybooks(projectId);
const opts = (data || []).map(playbook => ({
value: playbook,