Skip to content

Commit

Permalink
Merge pull request #159 from CLIxIndia-Dev/hotfix/cs/handle-ids-with-…
Browse files Browse the repository at this point in the history
…trailing-slash

better regex for ids with trailing slash in URL
  • Loading branch information
coleshaw authored Mar 28, 2018
2 parents c01cd88 + 76c5b9d commit 75a13c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions assessment/assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,29 +103,29 @@
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/qti/?", "AssessmentTakenQuestionQTIDetails",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/status/?", "AssessmentTakenQuestionStatus",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/submit/?", "AssessmentTakenQuestionSubmit",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/?", "AssessmentTakenQuestionDetails",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*[^/])/?", "AssessmentTakenQuestionDetails",
"/banks/(.*)/assessmentstaken/(.*)/questions/?", "AssessmentTakenQuestions",
"/banks/(.*)/assessmentstaken/(.*)/finish/?", "FinishAssessmentTaken",
"/banks/(.*)/assessmentstaken/(.*)/?", "AssessmentTakenDetails",
"/banks/(.*)/assessmentstaken/(.*[^/])/?", "AssessmentTakenDetails",
"/banks/(.*)/assessments/(.*)/assessmentsoffered/?", "AssessmentsOffered",
"/banks/(.*)/assessmentsoffered/?", "AssessmentsOffered",
"/banks/(.*)/assessmentsoffered/(.*)/?", "AssessmentOfferedDetails",
"/banks/(.*)/assessments/(.*)/assignedbankids/(.*)/?", "AssessmentRemoveAssignedBankIds",
"/banks/(.*)/assessmentsoffered/(.*[^/])/?", "AssessmentOfferedDetails",
"/banks/(.*)/assessments/(.*)/assignedbankids/(.*[^/])/?", "AssessmentRemoveAssignedBankIds",
"/banks/(.*)/assessments/(.*)/assignedbankids/?", "AssessmentAssignedBankIds",
"/banks/(.*)/assessments/(.*)/items/(.*)/?", "AssessmentItemDetails",
"/banks/(.*)/assessments/(.*)/items/(.*[^/])/?", "AssessmentItemDetails",
"/banks/(.*)/assessments/(.*)/items/?", "AssessmentItemsList",
"/banks/(.*)/assessments/(.*)/?", "AssessmentDetails",
"/banks/(.*)/assessments/(.*[^/])/?", "AssessmentDetails",
"/banks/(.*)/assessments/?", "AssessmentsList",
"/banks/(.*)/items/(.*)/videoreplacement/?", "ItemVideoTagReplacement",
"/banks/(.*)/items/(.*)/qti/?", "ItemQTIDetails",
"/banks/(.*)/items/(.*)/?", "ItemDetails",
"/banks/(.*)/items/(.*[^/])/?", "ItemDetails",
"/banks/(.*)/items/?", "ItemsList",
"/banks/(.*)/?", "AssessmentBankDetails",
"/banks/?", "AssessmentBanksList",
"/hierarchies/roots/(.*)/?", "AssessmentHierarchiesRootDetails",
"/hierarchies/roots/(.*[^/])/?", "AssessmentHierarchiesRootDetails",
"/hierarchies/roots/?", "AssessmentHierarchiesRootsList",
"/hierarchies/nodes/(.*)/children/?", "AssessmentHierarchiesNodeChildrenList",
"/hierarchies/nodes/(.*)/?", "AssessmentHierarchiesNodeDetails"
"/hierarchies/nodes/(.*[^/])/?", "AssessmentHierarchiesNodeDetails"
)


Expand Down
4 changes: 2 additions & 2 deletions logging_/logging_.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

urls = (
"/logs/?", "LogsList",
"/logs/(.*)/logentries/(.*)/?", "LogEntryDetails",
"/logs/(.*)/logentries/(.*[^/])/?", "LogEntryDetails",
"/logs/(.*)/logentries/?", "LogEntriesList",
"/logs/(.*)/?", "LogDetails",
"/logs/(.*[^/])/?", "LogDetails",
"/genericlog/?", "GenericLogEntries"
)

Expand Down
6 changes: 3 additions & 3 deletions repository/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

urls = (
"/repositories/(.*)/assets/(.*)/contents/(.*)/stream/?", "AssetContentStream",
"/repositories/(.*)/assets/(.*)/contents/(.*)/?", "AssetContentDetails",
"/repositories/(.*)/assets/(.*)/contents/(.*[^/])/?", "AssetContentDetails",
"/repositories/(.*)/assets/(.*)/contents/?", "AssetContentsList",
"/repositories/(.*)/assets/(.*)/?", "AssetDetails",
"/repositories/(.*)/assets/(.*[^/])/?", "AssetDetails",
"/repositories/(.*)/assets/?", "AssetsList",
"/repositories/(.*)/?", "RepositoryDetails",
"/repositories/(.*[^/])/?", "RepositoryDetails",
"/repositories/?", "RepositoriesList"
)

Expand Down

0 comments on commit 75a13c5

Please sign in to comment.