Skip to content

Commit 00959d1

Browse files
authored
Merge pull request #26 from BinarCode/2.4.3
2.4.3
2 parents 1a1eb37 + 65a026b commit 00959d1

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/auto-release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
types: [ closed ]
6+
branches:
7+
- "main"
8+
9+
jobs:
10+
release:
11+
name: Create release
12+
if: github.event.pull_request.merged == true
13+
runs-on: "ubuntu-latest"
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: ncipollo/release-action@v1
17+
with:
18+
name: ${{ github.event.pull_request.title }}
19+
tag: ${{ github.event.pull_request.title }}
20+
body: ${{ github.event.pull_request.body }}
21+
prerelease: false
22+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
23+
# uses the default GitHub actions app token

.github/workflows/psalm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.0'
19+
php-version: '8.1'
2020
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
2121
coverage: none
2222

src/Models/TenantScope.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class TenantScope implements Scope
1111
public function apply(Builder $builder, Model $model)
1212
{
1313
$column = $model->qualifyColumn(config('tenantable.related_tenant_column'));
14-
$tenantKey = tenant()->key();
14+
$tenantKey = Tenant::check()
15+
? tenant()->key()
16+
: null;
1517

1618
if (config('tenantable.allow_nullable_tenant')) {
1719
$builder->where(function (Builder $query) use ($column, $tenantKey) {

0 commit comments

Comments
 (0)