Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/models/team.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pub struct Team {
pub struct NewTeam<'a> {
pub login: &'a str,
pub github_id: i32,
pub name: Option<String>,
pub avatar: Option<String>,
pub name: Option<&'a str>,
pub avatar: Option<&'a str>,
pub org_id: i32,
}

Expand All @@ -49,8 +49,8 @@ impl<'a> NewTeam<'a> {
login: &'a str,
org_id: i32,
github_id: i32,
name: Option<String>,
avatar: Option<String>,
name: Option<&'a str>,
avatar: Option<&'a str>,
) -> Self {
NewTeam {
login,
Expand Down Expand Up @@ -174,8 +174,8 @@ impl Team {
&login.to_lowercase(),
org_id,
team.id,
team.name,
org.avatar_url,
team.name.as_deref(),
org.avatar_url.as_deref(),
)
.create_or_update(conn)
.map_err(Into::into)
Expand Down
2 changes: 1 addition & 1 deletion src/typosquat/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub mod faker {
&format!("github:{org}:{team}"),
next_gh_id(),
next_gh_id(),
Some(team.to_string()),
Some(team),
None,
)
.create_or_update(conn)?,
Expand Down