diff options
Diffstat (limited to 'src/db/models/group.rs')
-rw-r--r-- | src/db/models/group.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db/models/group.rs b/src/db/models/group.rs index e226512d..d9a08970 100644 --- a/src/db/models/group.rs +++ b/src/db/models/group.rs @@ -191,10 +191,11 @@ impl Group { }} } - pub async fn find_by_uuid(uuid: &str, conn: &mut DbConn) -> Option<Self> { + pub async fn find_by_uuid_and_org(uuid: &str, org_uuid: &str, conn: &mut DbConn) -> Option<Self> { db_run! { conn: { groups::table .filter(groups::uuid.eq(uuid)) + .filter(groups::organizations_uuid.eq(org_uuid)) .first::<GroupDb>(conn) .ok() .from_db() |