Spaces:
Running
Running
Update convert.py
#6
by
Narsil
HF staff
- opened
- convert.py +6 -1
convert.py
CHANGED
@@ -190,7 +190,12 @@ def previous_pr(api: "HfApi", model_id: str, pr_title: str) -> Optional["Discuss
|
|
190 |
except Exception:
|
191 |
return None
|
192 |
for discussion in discussions:
|
193 |
-
if
|
|
|
|
|
|
|
|
|
|
|
194 |
return discussion
|
195 |
|
196 |
|
|
|
190 |
except Exception:
|
191 |
return None
|
192 |
for discussion in discussions:
|
193 |
+
if (
|
194 |
+
discussion.status == "open"
|
195 |
+
and discussion.is_pull_request
|
196 |
+
and discussion.title == pr_title
|
197 |
+
and discussion.target_branch == "main"
|
198 |
+
):
|
199 |
return discussion
|
200 |
|
201 |
|