Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Django] Use name of variable instead of Python variable repr. #1568

Merged
merged 7 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down
1 change: 1 addition & 0 deletions docs/examples/add-to-your-application/go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

test:
make -C ../../../../languages/go copy_lib
go mod tidy
go test
2 changes: 1 addition & 1 deletion docs/examples/quickstart/go
Submodule go updated from 31e678 to 2f2d68
2 changes: 1 addition & 1 deletion docs/examples/quickstart/java
Submodule java updated from 2ed954 to 20404c
2 changes: 1 addition & 1 deletion docs/examples/quickstart/nodejs
2 changes: 1 addition & 1 deletion docs/examples/quickstart/python
2 changes: 1 addition & 1 deletion docs/examples/quickstart/ruby
Submodule ruby updated from 71ab7d to a016aa
2 changes: 1 addition & 1 deletion docs/examples/quickstart/rust
Submodule rust updated from f11ac4 to 0a1e68
4 changes: 2 additions & 2 deletions docs/examples/quickstart/test_quickstarts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


quickstarts = {
go: { setup: 'go build', server: './oso-go-quickstart' },
go: { setup: 'go mod tidy && go build', server: './oso-go-quickstart' },
# TODO: add local_setup that tests against local Oso install for java
java: { setup: 'make install', server: 'make run' },
# TODO: add local_setup that tests against local Oso install for nodejs
Expand All @@ -22,7 +22,7 @@
}

if ARGV.include? "local"
quickstarts[:go][:setup] = "make -C ../../../../languages/go copy_lib && go mod edit -replace github.com/osohq/go-oso=../../../../languages/go && go build"
quickstarts[:go][:setup] = "make -C ../../../../languages/go copy_lib && go mod edit -replace github.com/osohq/go-oso=../../../../languages/go && go mod tidy && go build"
quickstarts[:python][:setup] = "pip install -e ../../../../languages/python/oso && pip install --upgrade -r requirements.txt"
quickstarts[:ruby][:setup] = "BUNDLE_GEMFILE=../Gemfile-local bundle"
quickstarts[:ruby][:server] = "BUNDLE_GEMFILE=../Gemfile-local bundle exec ruby server.rb"
Expand Down
4 changes: 3 additions & 1 deletion languages/python/django-oso/django_oso/partial.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def get_model_by_path(

class FilterBuilder:
def __init__(self, model: Model, name="_this", parent=None):
self.name = name
self.name = (
super(Variable, name).__str__() if isinstance(name, Variable) else name
)
self.model = model
self.filter = TRUE_FILTER
# Map variables to subquery
Expand Down