Harden migrate session to prevent duplicate migration errors (#1599)

This commit is contained in:
Firstyear 2023-05-06 22:56:52 +10:00 committed by James Hodgkinson
parent 3e92d0f18a
commit 7d046f37ba
No known key found for this signature in database

View file

@ -1195,4 +1195,9 @@ impl ValueSetT for ValueSetApiToken {
// This is what ties us as a type that can be refint checked. // This is what ties us as a type that can be refint checked.
Some(Box::new(self.map.keys().copied())) Some(Box::new(self.map.keys().copied()))
} }
fn migrate_session_to_apitoken(&self) -> Result<ValueSet, OperationError> {
// We are already in the api token format, don't do anything.
Ok(Box::new(self.clone()))
}
} }