don't store fedtomag twice
This commit is contained in:
parent
64092eeddd
commit
bfa3a93bd6
@ -292,10 +292,6 @@ impl EntityGateway for PostgresGateway {
|
||||
}
|
||||
|
||||
async fn feed_mag(&mut self, mag_item_id: &ItemEntityId, tool_item_id: &ItemEntityId) {
|
||||
sqlx::query("insert into item_location (item, location) values ($1, $2);")
|
||||
.bind(tool_item_id.0)
|
||||
.bind(sqlx::types::Json(PgItemLocationDetail::from(ItemLocation::FedToMag {mag: *mag_item_id})))
|
||||
.execute(&self.pool).await.unwrap();
|
||||
sqlx::query("insert into mag_modifier (mag, modifier) values ($1, $2);")
|
||||
.bind(mag_item_id.0)
|
||||
.bind(sqlx::types::Json(PgMagModifierDetail::from(mag::MagModifier::FeedMag{food: *tool_item_id})))
|
||||
|
Loading…
x
Reference in New Issue
Block a user