diff --git a/README.md b/README.md new file mode 100644 index 0000000..718f352 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# DMP-CMS-Backend-API \ No newline at end of file diff --git a/query.py b/query.py index bcce7b1..564c202 100644 --- a/query.py +++ b/query.py @@ -42,7 +42,7 @@ def get_issue_owner(name): return response def get_actual_owner_query(owner): - results = DmpOrg.query.filter(DmpOrg.name.like(f'%{owner}%')).all() + results = DmpIssue.query.filter(DmpIssue.repo_owner.like(f'%{owner}%')).all() results = [val.to_dict() for val in results] return results diff --git a/v2_app.py b/v2_app.py index b4c2af8..b25cf37 100644 --- a/v2_app.py +++ b/v2_app.py @@ -19,6 +19,7 @@ def get_issues_by_owner_id_v2(owner, issue): url = f"https://github.com/{owner}" + # import pdb;pdb.set_trace() actual_owner = PostgresORM.get_actual_owner_query(owner) repo_owner =actual_owner[0]['repo_owner'] if actual_owner else "" #create url with repo owner