mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 19:02:07 +00:00
Exclude staff from CLA check
This commit is contained in:
parent
8ce7594a26
commit
1fd72d26cb
2 changed files with 14 additions and 8 deletions
|
@ -42,14 +42,19 @@ impl Database {
|
|||
}
|
||||
};
|
||||
|
||||
let Some(user) = user::Entity::find().filter(condition).one(&*tx).await? else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some(contributor) = contributor::Entity::find_by_id(user.id).one(&*tx).await?
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
Ok(Some(contributor.signed_at))
|
||||
if let Some(user) = user::Entity::find().filter(condition).one(&*tx).await? {
|
||||
if user.admin {
|
||||
return Ok(Some(user.created_at));
|
||||
}
|
||||
|
||||
if let Some(contributor) =
|
||||
contributor::Entity::find_by_id(user.id).one(&*tx).await?
|
||||
{
|
||||
return Ok(Some(contributor.signed_at));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ pub struct Model {
|
|||
pub inviter_id: Option<UserId>,
|
||||
pub connected_once: bool,
|
||||
pub metrics_id: Uuid,
|
||||
pub created_at: DateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
|
|
Loading…
Reference in a new issue