Skip to content

Commit 84d52e5

Browse files
committed
models/owner: Remove obsolete find_by_login() fn
This fn isn't used anymore…
1 parent 6d897d3 commit 84d52e5

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/models/owner.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ impl Owner {
7979
}
8080
}
8181

82-
/// Finds the owner by name. Never recreates a team, to ensure that
83-
/// organizations that were deleted after they were added can still be
84-
/// removed.
85-
///
86-
/// May be a user's GH login or a full team name. This is case
87-
/// sensitive.
88-
pub fn find_by_login(conn: &mut impl Conn, name: &str) -> AppResult<Owner> {
89-
if name.contains(':') {
90-
Team::find_by_login(conn, name)
91-
.optional()?
92-
.map(Owner::Team)
93-
.ok_or_else(|| bad_request(format_args!("could not find team with login `{name}`")))
94-
} else {
95-
User::find_by_login(conn, name)
96-
.optional()?
97-
.map(Owner::User)
98-
.ok_or_else(|| bad_request(format_args!("could not find user with login `{name}`")))
99-
}
100-
}
101-
10282
pub fn kind(&self) -> i32 {
10383
match self {
10484
Owner::User(_) => OwnerKind::User as i32,

0 commit comments

Comments
 (0)