Skip to content

Commit 2eadd7c

Browse files
committed
Exclude inactive accounts when considering which user to invite
Accounts where the gh_id is -1 are accounts we know are inactive and should never be invited to own crates
1 parent 0e9bd4f commit 2eadd7c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/models/owner.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ impl Owner {
7272
} else {
7373
users::table
7474
.filter(users::gh_login.eq(name))
75+
.filter(users::gh_id.ne(-1))
7576
.first(conn)
7677
.map(Owner::User)
7778
.map_err(|_| cargo_err(&format_args!("could not find user with login `{}`", name)))

0 commit comments

Comments
 (0)