(&self, mutation: &Mutation, topic_id: &ExternalId)
| 775 | } |
| 776 | |
| 777 | fn ensure_topic(&self, mutation: &Mutation, topic_id: &ExternalId) -> RepoTopic { |
| 778 | match mutation.fetch_topic(self.repo_id, topic_id) { |
| 779 | Some(topic) => topic, |
| 780 | |
| 781 | // If the topic is being upserted into another repo, we create a reference to the |
| 782 | // parent topic in the current repo |
| 783 | None => { |
| 784 | log::info!( |
| 785 | "no topic found in selected repo, creating reference: {}", |
| 786 | topic_id |
| 787 | ); |
| 788 | RepoTopic::make_reference(topic_id.to_owned()) |
| 789 | } |
| 790 | } |
| 791 | } |
| 792 | } |
| 793 | |
| 794 | pub struct UpsertTopicTimerange { |
no test coverage detected