#229 Shared users mandatory on admin
* changes mandatory state of users and teams on admin backend to optional (as expected by the model) * adds team selection to admin backend
This commit is contained in:
@@ -6,12 +6,14 @@ from ema.models import Ema
|
||||
|
||||
class EmaAdmin(AbstractCompensationAdmin):
|
||||
filter_horizontal = [
|
||||
"users"
|
||||
"users",
|
||||
"teams",
|
||||
]
|
||||
|
||||
def get_fields(self, request, obj=None):
|
||||
return super().get_fields(request, obj) + [
|
||||
"users"
|
||||
"users",
|
||||
"teams",
|
||||
]
|
||||
|
||||
admin.site.register(Ema, EmaAdmin)
|
||||
|
||||
Reference in New Issue
Block a user